首页 > Web开发 > 详细

HTML

时间:2015-09-08 22:02:58      阅读:311      评论:0      收藏:0      [点我收藏+]

页面上添加一个按钮,使用传递参数的方法实现单击按钮的时候弹出对话框显示hello world
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function num(n){
 var n1=document.getElementById("btn").value;
 
 alert(n);
 }
</script>
</head>

<body>
<input type="button" id="btn" value="按钮" onclick="num(‘HELLO WORLD‘)">

</body>
</html>

HTML

原文:http://www.cnblogs.com/rentingting/p/4792960.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!