请问这样的JS如何写?谢谢大伙
解决方案 »
- jquery怎么阻止后绑定的事件
- alert() 这个方法伤不起啊!
- 1.功能逻辑.一个是判断加载情况,一个是服务器响应情况,两个逻辑功能的判断,分开来条理清晰,职责清晰 2.减少判断次数,这里一般跟踪的是readysatus变化
- 从字符串删除指定的字符串
- 如何做检测
- 如何在JS中类似AOP那样,在所有方法开始前和结束后调用某个方法?
- 请问高手:如何实现层的定时关闭,具体情况见内容
- 请教:用鼠标移动TEXT,如何保持鼠标和TEXT控件的相对位置?
- 两个小问题请教一下(在线等待)
- 升5个等边三角行,散200,
- jquery写的一个图片切换效果,图片显示不正常,请大侠指点一下。
- js中刷新页面以后怎么自动发送一个请求
<!doctype html>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
</style>
</head>
<body>
<button id="test">test</button>
<script>
function $(o){return document.getElementById(o)}
$('test').onclick = function(){
alert('test');
this.disabled = true;
setTimeout(fn, 2000);
}
function fn(){
$('test').disabled = false;
}
</script>
</body>
</html>楼主 这个意思?
<input type="button" onclick="disButton(this)" value="click me">function disButton(self){
self.disabled = true;
setTimeout(function(){
self.disabled = false;
}, 5000)
}