哪位哥哥,能帮我写一个demo呀.一个"按钮"和一个"DIV"初始的时候是在一个div里面一直输出字符 A然后 当鼠标指着"按钮"的时候,DIV里面的文字暂停输出;然后 鼠标 离开"按钮"的时候又继续输出
解决方案 »
- 关于一个大部分人都用过的一个导航栏中的JS抛错,纠结一天,希望大家帮忙
- [关于iframe]如何从住页面控制第二级iframe的href啊?
- 怎樣在框架頁中從一個框架取得另一個框架中不在同一個站點頁面的超鏈接!
- 选一个出现一个怎么做?
- title属性的问题
- 请问各位老大,IE上多装了一个补丁,有些javascript的脚本运行不了了,如何解决?是什么原因啊,多谢
- 请问JS事件程序是不是要返回真才会被执行?
- 如何用javascript实现从一个页面自动转向另一个页面
- 关于disable属性
- backbone.view 中 $el 和 el 区别在什么地方呢?
- jquery cookie无效?
- 类中用setTimeout调用类方法出错
<script type="text/javascript">
<!--
var t="";
function Start(){
var g = document.getElementById("g")
g.innerHTML +="A"
t = setTimeout("Start()",1000)
}
function Stop(){
clearTimeout(t)
}
window.onload=function(){
Start();
var go = document.getElementById("go")
go.onmouseover =function(){
Stop();
//alert("x")
}
go.onmouseout =function(){
Start();
}
}
//-->
</script>
</head> <body>
<div id="g"></div>
<input type="button" value="Let's Go" id="go">
</body>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无题</title>
</head>
<body><button onmouseover="test.isue()" onmouseout="test.rere()">我不是按钮</button><div id="div1"></div><script>
var test = {};
test.timer = null;
test.interval = 300;test.helpme = function (){
var obj = document.getElementById('div1');
obj.innerHTML += 'A';
}test.timer = setInterval(test.helpme,test.interval);test.isue = function (){
clearInterval(test.timer);
}test.rere = function (){
test.timer = setInterval(test.helpme,test.interval);
}
</script>
</body>
</html>