看板 Web_Design 關於我們 聯絡資訊
※ 引述《justinC (無)》之銘言: : 我照書上打了範例 : 一直跑不出 波形的結果 : <script> : function showbar(w){ : document.write("<hr style='width:"+w+";' noshade>");} : du=Math.PI/180; : for(i=0;i<=350;i+=18) : {ang=i*du; : a=250+200*Math.sin(ang); : document.write(a+"<BR>"); : showbar(a); : } : </script> : java script語法應該沒有錯 : 但是在css那width可能發生問題 數值w明明每次都會變化 不知道坎入css哪裡錯誤 謝謝 我把那行<hr>獨立出來 <hr style="width:30"; noshade> 僅僅單純html語法 但是不能依數值改變長度 是style那好像有問題 雖然可以不用style就可以改變 但是還是想問問看style是錯在哪 謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.221.120.127
LPH66:我已推在原文... 12/23 23:57
justinC:對調還是不行.. 12/24 11:25