JavaScript alert 警告框 【每日一段代码46】
<html>
<head>
<script type="text/javascript">
function disp_alert()
{
alert("我是警告框");
}
</script>
<body>
<input type="button" onclick="disp_alert()" value="显示警告框">
</body>
</html>
html5
<html>
<head>
<script type="text/javascript">
function disp_alert()
{
alert("我是警告框");
}
</script>
<body>
<input type="button" onclick="disp_alert()" value="显示警告框">
</body>
</html>