怎么把這段代碼?$(document).ready(function(){? $("button").click(function(){? $(this).hide();寫(xiě)到.js文件中 ?然后使用 ?<html><head><script type="text/javascript" src="/jquery/jquery.js"></script><script type="text/javascript">$(document).ready(function(){? $("button").click(function(){? $(this).hide();});});</script></head><body><button type="button">Click me</button></body></html>
1 回答
已采納

慕勒0069038
TA貢獻(xiàn)143條經(jīng)驗(yàn) 獲得超39個(gè)贊
xxx.js =>
document.write('<script type="text/javascript" src="/jquery/jquery.js"></script>></script>');
$(document).ready(function(){
? $("button").click(function(){
? $(this).hide();
xxx.html =>
<html>
<head>
<script type="text/javascript" src="/xxx.js"></script>
</head>
<body>
<button type="button">Click me</button>
</body>
</html>
是這個(gè)意思吧
點(diǎn)擊展開(kāi)后面1條
添加回答
舉報(bào)
0/150
提交
取消