js点击事件demo
来源:互联网 发布:spss如何输入数据 编辑:程序博客网 时间:2024/05/18 22:42
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>小测试</title>
</head>
<body>
<input id="btn1" type="button" value="哈哈" />
<input id="btn2" type="button" value="嘻嘻" />
<input id="btn3" type="button" value="啦啦" />
<input id="btn4" type="button" value="嘿嘿" />
<script type="text/javascript">
var xh={};
xh.btn1=document.getElementById("btn1");
xh.btn2=document.getElementById("btn2");
xh.btn3=document.getElementById("btn3");
xh.btn4=document.getElementById("btn4");
window.onload=function(){
xh.btn1.onclick=function(){
var jg=Math.round(Math.random()*30);
xh.btn2.value=jg;
alert("hello");//弹出提示框
}
xh.btn2.onclick=function(){
var jg=Math.round(Math.random()*40);
xh.btn3.value=jg;
}
xh.btn3.onclick=function(){
var jg=Math.round(Math.random()*50);
xh.btn4.value=jg;
}
xh.btn4.onclick=function(){
var jg=Math.round(Math.random()*60);
xh.btn1.value=jg;
xh.btn2.value=jg;
xh.btn3.value=jg;
xh.btn4.value=jg;
}
}
</script>
</body>
</html>
- js点击事件demo
- R::shiny 点击事件-Demo
- JS右键点击事件
- JS右键点击事件
- js模拟点击事件
- js鼠标点击事件
- js 点击精灵事件
- js 模拟点击事件
- js模拟点击事件
- js触发点击事件
- cocos2d - JS 点击事件
- JS语言 点击事件
- JS点击注册事件
- js点击事件
- js DOM 点击事件
- 地图js点击事件
- js调用点击事件
- JS 阻止点击事件
- 错误 1 error MSB8008: 指定的平台工具集(v110)未安装或无效。请确保选择受支持的 PlatformToolset 值
- 从 __proto__ prototype 说起
- 适配器模式(Adapter Class/Object)
- 《JAVA与模式》之适配器模式
- 2016年8月30号
- js点击事件demo
- 从零基础接触java第七周第二节
- Intellij Idea @Autowired取消提示
- js闭包使用及建议
- WebStorm快捷键操作
- >LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- Codeforces Problem 711A Bus to Udayland(brute force+implementation)
- 软件工程师的好习惯
- listView嵌套radiobutton