您的位置:首页 > 其它

[orginal]checkBox based on web(thinking in & implementation)

2009-09-23 09:12 337 查看
structure: the checkbox from physical point of view is two images( checked and unchecked) ,with caption text.
Code

function changeState( element ,height ,statNumber)

{

//statNumber the number of state we want to show currently

// elemnt is imageBackground for span

/// 0: normal status,1 mouseMove status,2 mousepress status, 3 fucuse,4 disable ,5 no

var top=height*statNumber;

// alert('100% -'+left+'px');

document.getElementById(element).style.backgroundPosition='100% -'+top+'px';

}

here you go the result:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: