2个回答
展开全部
这样:
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
function fun()
{
for (i=0; i<5; i++)
{
document.write("Hello World<br>");
}
}
</script>
</head>
<body>
<form action="">
<input type="submit" value="按钮" onclick="fun()"/>
</form>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
function fun()
{
for (i=0; i<5; i++)
{
document.write("Hello World<br>");
}
}
</script>
</head>
<body>
<form action="">
<input type="submit" value="按钮" onclick="fun()"/>
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询