有幫忙看看JQ怎么引用嗎??謝謝
<!DOCTYPE html>
<html>
?<head>
? <title>下拉菜單</title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
? <script type="text/javascript" src="https://libs.baidu.com/jquery/1.9.0/jquery.js">
? $("#first").text("2");
? </script>
</head>
<body>
<div id="first">1</div>
</body>
</html>
幫忙看看哪里有錯的,不是這樣引用嗎,結果顯示還是1。
2019-05-09
你不能在你引用的JQuery庫里面寫代碼,要再寫一個<script>$(function() { $("#first).text("2") })</script>