返回信息流下面这段代码能正确弹出alert警告窗:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script type="text/javascript">
var helloMr = function()
{
alert("先生,您好!");
}
</script>
</head>
<body>
<form id="form1">
<input type="button" onclick="helloMr();" value="问候先生">
</form>
</body>
</html>
为什么直接在onclick那里改成调用alert函数就不能弹出了呢?如下:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<form id="form1">
<input type="button" onclick="alert("先生,您好!");" value="问候先生">
</form>
</body>
</html>
这是一条镜像帖。来源:北邮人论坛 / www-technology / #24258同步于 2014/4/1
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
菜鸟求教javascript一个问题
wislov
2014/4/1镜像同步18 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
select * from students where name = 'Robert'; drop table students; -- ';
其实这个学生的名字叫Robert'; drop table students; --
那最后那个单引号干嘛的啊
【 在 nuanyangyang 的大作中提到: 】
: select * from students where name = 'Robert'; drop table students; -- ';
: 其实这个学生的名字叫Robert'; drop table students; --