第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

換成<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>P2才能顯示這是為什么呢,原先是 <script src="http://code.jquery.com/jquery-1.11.3.js"></script>

<head>

? ? <meta http-equiv="Content-type" content="text/html; charset=utf-8" />

? ? <title></title>

? ? <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>

? ??

? ? <!-- 使用JS原生語法 -->

? ? <script type="text/javascript">

? ? ? ? window.onload = function(){

? ? ? ? ? ? // 通過原生JS語法獲取id為imooc1的元素p

var p = document.getElementById('imooc1');

? ? ? ? ? ? // 將元素p在html中內(nèi)容改變

p.innerHTML = 'P1:您好!通過慕課網(wǎng)學習jQuery才是最佳的途徑';

? ? ? ? ? ? // 將元素p的內(nèi)容顏色改為紅色

p.style.color = 'red';

? ? }

? ? </script>

? ??

? ? <!-- 使用jQuery語法 -->

? ? <script type="text/javascript">

? ? ? ? $(document).ready(function() {

? ? ? ? ? ? /**

? ? ? ? ? ? ?* 通過jQuery語法獲取id為imooc2的元素獲得一個jQuery對象

? ? ? ? ? ? ?* 調(diào)用該對象的html()方法進行更改內(nèi)容

? ? ? ? ? ? ?* 調(diào)用該對象的css()方法進行更改顏色樣式

? ? ? ? ? ? ?*/ ??

? ? ? ? ? ? ? ?var $p = $('#imooc2');

? ? ? ? ? ? $p.html('P2:您好!通過慕課網(wǎng)學習jQuery才是最佳的途徑').css('color','red');

? ? ? ? });

? ? </script>

? ??

</head>


<body>

? ? <p id="imooc1"></p>

? ? <p id="imooc2"></p>


正在回答

3 回答

可能是慕課網(wǎng)的服務(wù)器訪問不了這個js地址吧:http://code.jquery.com/jquery-1.11.3.js


0 回復 有任何疑惑可以回復我~
#1

紫羋璃 提問者

非常感謝!
2016-12-15 回復 有任何疑惑可以回復我~

非常感謝

0 回復 有任何疑惑可以回復我~

最好辦法就是下載jquery-3.0.0.js解壓后放入與html并列文件夾中,html修正為<script type="text/javascript" src="jquery-3.0.0.js"></script>,并將練習代碼復入運行,試一試吧

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

換成<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>P2才能顯示這是為什么呢,原先是 <script src="http://code.jquery.com/jquery-1.11.3.js"></script>

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號