解决了:
主要问题在于:
<!doctype html>
<html>
<head>
<title>test</title>
<meta charset="UTF-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('#main_body').append("<h1>Hello</h1><input id=\"but\" type=\"button\">Click");
$( "#but" ).on( "click", function() {
alert( "bla bla" );
});
});
</script>
</head>
<body id="main_body">
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我觉得jquery太老了
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
解决了问题:)
添加DOM后为什么警报不起作用?点击它后应显示"bla bla".
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
Run Code Online (Sandbox Code Playgroud) 我看了很长时间才找到解决方案,但我找不到任何解决方案.是否有可能将图片从剪贴板上传到服务器上的文件(按ctrl + v)?它适用于Chrome.
使用PHP,Javascript,jquery,还是其他?铬的一些外部扩展?
非常感谢.