在Js文件中写一个控件????说白了还是没有明白你的意思在JS文件中定义一函数function MyFun()
{}不需要<script></script>在页面中调用
<srcipt language="JavaScript" src="JS的文件名"></script>就可以用了
{}不需要<script></script>在页面中调用
<srcipt language="JavaScript" src="JS的文件名"></script>就可以用了
解决方案 »
- js能否判断访问权限
- 这个页面查看源码时,居然获取不到真正的HTML CODE,请教大家
- 如何限制文本框在限定时间内必须输入完毕
- 自个写了一个Javascript来排序table的示例,大家给找找
- 推荐一本javascript书籍!
- 高分求JS高手帮我分析这段代码.
- 客户端导出EXCEL(利用ActiveXObject("Excel.Application"))的问题
- 求javascript资料下载
- 高分在线求助:如何让下面"邮件正在发送, 请稍候..."框在当前页面经过一段时间自动消失??
- 使用jsp把jquery中怎样把datagrid导出为excel
- 如果在HTML页面上实现同时接受单击和双击事件?详情见下!
- ★★★ ★★★ 有没有人写过时间输入控件★★★ ★★★
<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>
<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
--------------
function test(obj)
{
obj.onkeyup = function()
{
alert(obj.value);
}
}css
--------------
.alert
{
lxc:expression(test(this));
}html
--------------
<input type="text" class="alert">