Input.htm
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
<style>
input{behavior:url('Input.htc')}
</style>
</head><body>
<input type=text value="文本">
<input type=button value="按钮">
</body></html>
Input.htc
<script language=javascript>
switch(type)
{
case 'text':
case 'password':
style.border="1px solid #000000";
style.backgroundColor="#FFFFFF";
style.height="18px";
style.font="normal 12px 宋体";
style.color="#000000";
break;
case 'submit':
case 'reset':
case 'button':
style.border="1px solid #000000";
style.backgroundColor="#CCCCCC";
style.height="18px";
style.font="normal 12px 宋体";
style.color="#000000";
break;
default:;
}
</script>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
<style>
input{behavior:url('Input.htc')}
</style>
</head><body>
<input type=text value="文本">
<input type=button value="按钮">
</body></html>
Input.htc
<script language=javascript>
switch(type)
{
case 'text':
case 'password':
style.border="1px solid #000000";
style.backgroundColor="#FFFFFF";
style.height="18px";
style.font="normal 12px 宋体";
style.color="#000000";
break;
case 'submit':
case 'reset':
case 'button':
style.border="1px solid #000000";
style.backgroundColor="#CCCCCC";
style.height="18px";
style.font="normal 12px 宋体";
style.color="#000000";
break;
default:;
}
</script>
解决方案 »
- 求助:JS获取变量值
- 纯js能实现无限级分类么?
- javascript问题,关于window对象。。
- 关于JS获取XML子节点的值的问题
- html页面中下拉列表怎么控制宽度?
- [惊喜]:FlashVml(璀灿之星)4.0发布、蓝丽网、蓝丽技术论坛恢复!
- javascript如何判断变量类型
- 求助:在IFrame中如何实现文本的自动换行???
- 用javascript如何改变<body background="A.jpg">中的backgroud图片
- 请教:如何改变<td>的disabled属性?
- 如何让VBScript与Javascript并存。并相互调用。
- 关于一个动态排序的问题,谁能帮我解决,立即给分!
<style>
input{
color:expression(this.type=='text'?"red":"");}
</style>
</head><body>
<input value=text>
<input type=button value=button >
</body></html>
input .textbox{}
<input class="textbox">