拼写错误/优化一下子(未经FF测试)<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
</head>
<body>
<script lanuage="JavaScript">
//var enabled=0
var TM;
function Time_Set(){
//TM=windows.setTimeout("Time_Set()",1000); //err=s
TM=window.setTimeout("Time_Set()",1000);
var today=new Date();
//document.clock.disp.value=tody.toLocaleString;//err=()
document.clock.disp.value=today.toLocaleString();}
</script>
<!--form-->
<form name=clock>
<input type="text" name="disp" value="" size=30 onFocus="this.blur()"> <input type="button" name="rad" value="off" onclick="
//if(enabled==1){
clearTimeout(TM);
//enabled=0;
document.clock.disp.value='';
/////////////////clearTimeout{TM};//err={}
//}
">
<!--input type="button" name="rad1" value="on" onclick=" if(enabled==0){ var TM=setTimeout('Time_Set()',1000);enabled=1;}"-->
<input type="button" name="rad1" value="on" onclick=" setTimeout('Time_Set()',1000);//enabled=1;">
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
</head>
<body>
<script lanuage="JavaScript">
//var enabled=0
var TM;
function Time_Set(){
//TM=windows.setTimeout("Time_Set()",1000); //err=s
TM=window.setTimeout("Time_Set()",1000);
var today=new Date();
//document.clock.disp.value=tody.toLocaleString;//err=()
document.clock.disp.value=today.toLocaleString();}
</script>
<!--form-->
<form name=clock>
<input type="text" name="disp" value="" size=30 onFocus="this.blur()"> <input type="button" name="rad" value="off" onclick="
//if(enabled==1){
clearTimeout(TM);
//enabled=0;
document.clock.disp.value='';
/////////////////clearTimeout{TM};//err={}
//}
">
<!--input type="button" name="rad1" value="on" onclick=" if(enabled==0){ var TM=setTimeout('Time_Set()',1000);enabled=1;}"-->
<input type="button" name="rad1" value="on" onclick=" setTimeout('Time_Set()',1000);//enabled=1;">
</form>
</body>
</html>
解决方案 »
- 我感觉不出这种写法的好处在哪里,谁能指明一二
- 救命啊,ScriptX使用问题
- js添加网页到收藏夹的问题!
- 谁有javascript的技术手册,或者教程(chm格式的最好)
- 请问jquery或者javascript有没有办法生成并输出html到一个文件夹里去?
- 怎么在父窗口的函数里面,获取子窗口的值?
- (急)下列框中能不能判断上次选择的值?
- 如何做到当我录入是一篇带有html标记的文本(如需要强调的内容显示为红色,作个联接等等)。输出是为按照html 的方式输出
- 怎么样以显示出HTML的控制代码?
- js递归调用获取等于子集的该子集对应所有父集的一条链的信息
- div+css模仿select效果
- 来者有分,大家帮忙,javascript中如何实现带有checkbox(即可勾选的)下拉多选框,在线急等!
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<script lanuage="JavaScript">
var TM;
function Time_Set(){
TM=window.setTimeout("Time_Set()",1000);
var today=new Date();
document.getElementById('disp').value=today.toLocaleString();
}
</script>
</head>
<body>
<input type="text" id="disp" name="disp" value="" size=30 onFocus="this.blur()">
<input type="button" name="rad" value="off" onclick=" clearTimeout(TM); document.getElementById('disp').value=''; ">
<input type="button" name="rad1" value="on" onclick=" setTimeout('Time_Set()',1000);">
</body>
</html>
<head>
</head>
<body>
<script lanuage="JavaScript">
enabled=0;
function Time_Set(){
TM=window.setTimeout("Time_Set()",1000);
var today=new Date();
document.clock.disp.value=tody.toLocaleString();}
</script>
<form>
<input type="text" name="disp" value="" size=30 onFocus="this.blur()">
<input type="button" name="rad" value="off" onclick="
if(enabled==1){
document.clock.disp.value='';
clearTimeout(TM);
enabled=0;
}">
<input type="button" name="rad1" value="on" onclick="
if(enabled==0){
var TM=setTimeout('Time_Set()',1000);
enabled=1;}">
</form>
</body>
</html>点击ON仍然不能显示时间
<html>
<head>
</head>
<body>
<script lanuage="JavaScript">
enabled=0;
function Time_Set(){
TM=window.setTimeout("Time_Set()",1000);
var today=new Date();
// document.clock.disp.value=tody.toLocaleString();//err=a
document.clock.disp.value=today.toLocaleString();
}
</script>
<!--form--><!--err=name-->
<form name=clock>
<input type="text" name="disp" value="" size=30 onFocus="this.blur()">
<input type="button" name="rad" value="off" onclick="
if(enabled==1){
document.clock.disp.value='';
clearTimeout(TM);
enabled=0;
}">
<input type="button" name="rad1" value="on" onclick="
if(enabled==0){
var TM=setTimeout('Time_Set()',1000);
enabled=1;}">
</form>
</body>
</html>