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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么變量d的內(nèi)容輸出不出來,我什么地方錯了

為什么變量d的內(nèi)容輸出不出來,我什么地方錯了

qq_小輝_4 2017-08-02 11:17:30
? var z=document.getElementsByTagName("li")[3]? ? document.write(z.nodeName);? ? document.write("=")? ? document.write(z.innerHTML+"<br/>")? ??? ? function get_previousSibling(n){? ? ? ? var x=n.previousSibling;? ? ? ? while(x&&x.nodeType!=1){? ? ? ? ? ?x= x.previousSibling? ? ? ? }? ? ? ? return x? ? }? ??? ? var d=get_previousSibling(z);? ? document.write(d.nodeName);? ? document.write("=")? ? document.write(d.innerHTML)
查看完整描述

1 回答

?
李曉健

TA貢獻1036條經(jīng)驗 獲得超461個贊

你的html代碼呢?

查看完整回答
反對 回復 2017-08-02
  • qq_小輝_4
    qq_小輝_4
    我是截取的,
  • 李曉健
    李曉健
    看一下你的html結(jié)構(gòu)是什么樣的。
  • qq_小輝_4
    qq_小輝_4
    <script type="text/javascript"> function get_nextSibling(n){ var x=n.nextSibling; while (x && x.nodeType!=1){ x=x.nextSibling; } return x; } var x=document.getElementsByTagName("li")[0]; document.write(x.nodeName); document.write(" = "); document.write(x.innerHTML); var y=get_nextSibling(x); if(y!=null){ document.write("<br />nextsibling: "); document.write(y.nodeName); document.write(" = "); document.write(y.innerHTML); }else{ document.write("<br>已經(jīng)是最后一個節(jié)點"); } var z=document.getElementsByTagName("li")[3] document.write(z.nodeName); document.write("=") document.write(z.innerHTML+"<br/>") function get_previousSibling(n){ var x=n.previousSibling; while(x&&x.nodeType!=1){ x= x.previousSibling } return x } var d=get_previousSibling(z); document.write(d.nodeName); document.write("=") document.write(d.innerHTML) </script>
點擊展開后面11
  • 1 回答
  • 0 關(guān)注
  • 1504 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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