高手进!设计一个HTML文件的代码:只有一个按钮,当单击时,弹出窗口提示“按钮被单击!”。
展开全部
<html>
<head>
<title>按钮被单击</title>
<script type="text/javascript">
<!--
function BTMsg(msg) { //v1.0
alert(msg);
}
//-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input name="button" type="submit" id="button" onclick="BTMsg('铵钮被单击!')" value="按钮" />
</label>
</form>
</body>
</html>
<head>
<title>按钮被单击</title>
<script type="text/javascript">
<!--
function BTMsg(msg) { //v1.0
alert(msg);
}
//-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input name="button" type="submit" id="button" onclick="BTMsg('铵钮被单击!')" value="按钮" />
</label>
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询