有谁知道为什么这在 IE9 中不起作用:http: //jsfiddle.net/S7ERu/1/
//jquery
$("#submitpost").on("click", function () {
alert('test');
});
//html
<a href="#" id="submitpost">Submit</a>
完整的独立版本,在 IE9 中不起作用:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#submitpost").on("click", function () {
alert('test');
});
</script>
<a href="#" id="submitpost">Submit</a>
</body>
</html>