会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
房客 的大杂烩
现在已经很杂了,C# asp.net Js VC++ 将来还会更杂。
checkbox在html中的三种状态 未选中,选中和默认
<
html
>
<
head
>
<
title
>
check在asp.net中的三种状态 未选中,选中和默认
</
title
>
<
script
language
="JavaScript"
>
<!--
/**/
/*
check在asp.net中的三种状态 未选中,选中和默认
作者:房客
网址:http://sxlfybb.cnblogs.com
*/
function
change(obj)
{
if
(obj
==
null
)
{
obj
=
document.getElementById(
"
che
"
);
}
if
(String(obj.style.backgroundColor)
==
String(
"
#dddddd
"
))
{
obj.value
=
""
;
obj.style.backgroundColor
=
""
;
return
;
}
if
(obj.value
==
""
)
{
obj.value
=
"
√
"
;
}
else
if
(obj.value
==
"
√
"
)
{
obj.style.backgroundColor
=
"
#dddddd
"
;
}
}
//
-->
</
script
>
</
head
>
<
style
>
#in input
{
}
{
width
:
15px
;
height
:
15px
;
padding-left
:
-20px
;
font-size
:
75%
;
cursor
:
hand
;
background-color
:
"#ffffff"
;
}
body
{
}
{
azimuth
:
75grad
}
</
style
>
<
body
>
<
div
id
="in"
>
<
input
type
="text"
id
="che"
onselectstart
="event.returnValue=false;"
ondragstart
="event.returnValue=false;"
readonly onclick
="change(this)"
><
a
onclick
=change()
>
点击我
</
a
>
</
div
>
</
body
>
</
html
>
posted on
2007-04-19 11:43
房客
阅读(
4763
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
导航
博客园
首页
订阅
管理