結(jié)果感覺(jué)和想象中不一樣啊
<!DOCTYPE?HTML> <html> <head> ????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"> ????<title>無(wú)標(biāo)題文檔</title> </head> <body> ????<p?id="intro">我的課程</p> ????<ul> ????????<li?title="JS">JavaScript</li> ????????<li?title="JQ">JQuery</li> ????????<li?title="">HTML/CSS</li> ????????<li?title="JAVA">JAVA</li> ????????<li?title="">PHP</li> ????</ul> ????<h1>以下為li列表title的值,當(dāng)title為空時(shí),新設(shè)置值為"WEB前端技術(shù)":</h1> ????<script?type="text/javascript"> ????????var?Lists?=?document.getElementsByTagName("li"); ????????for?(var?i?=?0;?i?<?Lists.length;?i++)?{ ????????????var?text?=?Lists[i].getAttribute("title"); ????????????document.write(text?+?"<br>"); ????????????if?(text?==?"")?{ ????????????????Lists[i].setAttribute("title",?"WEB前端技術(shù)"); ????????????????document.write(Lists[i].getAttribute("title")?+?"<br>"); ????????????} ????????} ????</script> </body> </html>
這個(gè)是今天的編程練習(xí),但是我寫(xiě)完代碼之后運(yùn)行發(fā)現(xiàn)有些問(wèn)題,為什么顯示的感覺(jué)有點(diǎn)問(wèn)題
為什么這個(gè)web前端技術(shù)好像前面多了一塊一樣,而且放在vscode中運(yùn)行也是一樣的,找了半天也沒(méi)有找到錯(cuò)誤,請(qǐng)問(wèn)有大佬能看出這個(gè)問(wèn)題出在哪里嗎?十分感謝?
2020-11-17
2020-11-16
http://shennizuidongqiu.com
http://feidaotuiqiu.me
http://dazhuokaiche.com
http://fds501.cc
http://fdq602.cc
http://fdw703.cc
http://fdw805.cc
http://fdw907.cc
http://zsn132.cc
http://zsn143.cc
http://zsn243.cc
http://zsn343.cc
http://zsn443.cc
http://zsn543.cc
http://zsn643.cc
http://msk121.cc
http://msk127.cc
http://msk129.cc
http://msk130.cc
http://zdzkc108.cc
http://zdzkc219.cc
http://zdzkc229.cc
http://zdzkc239.cc
http://zdzkc241.cc
http://dddsaa331.cc
http://dddsaa332.cc
http://dddsaa333.cc
http://dddsaa336.cc
http://dddsaa328.cc