JS求帮助 怎么点击按钮后不弹出对话框
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/l...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>JS函数的定义与调用</title>
<script>
function to(name)
{
alert("你好,"+name);
}
</script>
</head>
<body>
<input type="button" value="请点击" name="button1" onclick="to(’火星')"/>
</body>
</html> 展开
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>JS函数的定义与调用</title>
<script>
function to(name)
{
alert("你好,"+name);
}
</script>
</head>
<body>
<input type="button" value="请点击" name="button1" onclick="to(’火星')"/>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询