天天看點

JS常用搭配

總結

輸出:document.write(。。。);

彈窗:alert(。。。);

讀取資料類型:變量名=typeof 變量名(資料)

開方:

1.1 Math.aqrt(...);對...進行開方

1.2 Math.pow(變量名,次方);

  1. 變量名=promp(); --使用者輸入
  2. parseInt --去除小數點後的值

繼續閱讀