結果感覺和想象中不一樣啊
<!DOCTYPE?HTML> <html> <head> ????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"> ????<title>無標題文檔</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的值,當title為空時,新設置值為"WEB前端技術":</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前端技術"); ????????????????document.write(Lists[i].getAttribute("title")?+?"<br>"); ????????????} ????????} ????</script> </body> </html>
這個是今天的編程練習,但是我寫完代碼之后運行發現有些問題,為什么顯示的感覺有點問題
為什么這個web前端技術好像前面多了一塊一樣,而且放在vscode中運行也是一樣的,找了半天也沒有找到錯誤,請問有大佬能看出這個問題出在哪里嗎?十分感謝?
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