求只能点一次 有一个开始连接和停止连接开始 停止现在的问题是我点开始后,我要不能再点效果 就变成灰色除非点停止后再能点开始 否则只能点一次开始!谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type="button" id="ostart" value=" Start " onclick="this.disabled='disabled'" /><input type="button" value=" Stop " onclick="document.getElementById('ostart').disabled = false;" /> <a href="#" id="start" onclick="this.disabled=true;document.getElementById('end').disabled=false;">开始</a><a href="#" id="end" disabled onclick="this.disabled=true;document.getElementById('start').disabled=false;">结束</a> 感谢两位的回答我本身有两个方法<a href="#" onClick="update();" >开始</a><a href="#" onClick="Stopupdate();" >停止</a>我怎么样加才行啊 <script type="text/javascript"><!-- function update(ostart){ ostart.disabled = 'disabled'; } function Stopupdate(){ document.getElementById("ostart").disabled = false; }//--></script><a href="#" id='ostart' onClick="update(this);" >开始 </a> <a href="#" onClick="Stopupdate();" >停止 </a> <a href="#" id="start" onclick="update();this.disabled=true;document.getElementById('end').disabled=false;">开始</a><a href="#" id="end" disabled onclick="Stopupdate();this.disabled=true;document.getElementById('start').disabled=false;">结束</a> 不知道为什么我一点开始还是运行update();方法了明明看书灰色为什么还是起作用呢那出问题了 这是我的两个方法//开始自动刷新function update(){timeout = window.setInterval("sendRequest()", 1000);//设定1秒调用一次update.asp页面}//停止自动刷新function Stopupdate(){if (timeout != null){window.clearInterval(timeout);}}我是想只能点一下update()起作用现在是点一下 本来是1秒变0.5 点Stopupdate()还不能停点一次开始就点一下Stopupdate()就可以停点两次以上update()就停不了并且还是越来越快我意思是能不能控制点update()一直是1秒不要累加 点Stopupdate()应该可以停或只能点一下update() 点Stopupdate()后才能再点update() 可以在原来代码上加代码解决 s_liangchao1s 写的可行2楼的代码可以解决!谢谢!连接不能解决就只能用按钮了 页面有两个js冲突,请求解答 js文件追踪问题 请问可以用js获取图层的display属性吗? 自动另存页面 对动态文本框进行求和 有没这样子一个HTML拖放编辑器 关于省市关联下拉菜单的问题,求助!!!! 怎么实现这个? location的用途 js打印文件问题 正则表达式问题 如何求给定的任意一个时间段内,任先周几,周几之个得到这个时间段内选中周几的所有日期数
<input type="button" id="ostart" value=" Start " onclick="this.disabled='disabled'" />
<input type="button" value=" Stop " onclick="document.getElementById('ostart').disabled = false;" />
<a href="#" id="end" disabled onclick="this.disabled=true;document.getElementById('start').disabled=false;">结束</a>
<a href="#" onClick="update();" >开始</a>
<a href="#" onClick="Stopupdate();" >停止</a>我怎么样加才行啊
<script type="text/javascript">
<!--
function update(ostart){
ostart.disabled = 'disabled';
} function Stopupdate(){
document.getElementById("ostart").disabled = false;
}
//-->
</script>
<a href="#" id='ostart' onClick="update(this);" >开始 </a>
<a href="#" onClick="Stopupdate();" >停止 </a>
<a href="#" id="end" disabled onclick="Stopupdate();this.disabled=true;document.getElementById('start').disabled=false;">结束</a>
为什么还是起作用呢那出问题了
function update(){
timeout = window.setInterval("sendRequest()", 1000);//设定1秒调用一次update.asp页面
}
//停止自动刷新
function Stopupdate(){
if (timeout != null){
window.clearInterval(timeout);
}
}
我是想只能点一下update()起作用现在是点一下 本来是1秒变0.5 点Stopupdate()还不能停点一次开始就点一下Stopupdate()就可以停点两次以上update()就停不了
并且还是越来越快我意思是能不能控制点update()一直是1秒不要累加 点Stopupdate()应该可以停或只能点一下update() 点Stopupdate()后才能再点update() 可以在原来代码上加代码解决
谢谢!
连接不能解决就只能用按钮了