Javascript & JQuery & CSS > Javascript - Çüº¯È¯ ÇÔ¼ö µî·ÏÀÏ : 2017-09-08 12:31 Á¶È¸¼ö : 53,9231.eval() a="10+20" document.write(a) -> "10+20" document.write(eval(a)) -> 30 2. parseInt(¹®ÀÚ¿, Áø¼ö) : ¹®ÀÚ°ª -> ¿øÇÏ´Â Áø¼öÇüÅ (10Áø¼ö ±âº») a=10 , b=20 a+b=30 a=10, b="20" a+b="1020" a+parseInt(b)=30 3. parseFloat() : ¹®ÀÚ°ª -> ½Ç¼ö°ª var str1="1234e5" document.write("°á°ú°ª" + parseFloat(str1)) 4. String() : ¼ýÀÚÇü - > ¹®ÀÚÇü var systemDate = new Date(); yy = String(systemDate.getFullYear()); mm = String(systemDate.getMonth()); dd = String(systemDate.getDate()); mm_len = mm.length; dd_len = dd.length; 5. Number() : ¹®ÀÚÇü -> ¼ýÀÚÇü 6. escape() : ÇÑ±Û --> 16Áø¼ö 7. unescape() : 16Áø¼ö --> ÇÑ±Û 8. isFinite() : À¯ÇѼö : True , ¹«ÇѼö : False 9. isNan() : ¹®ÀÚ True , ¼ýÀÚ : false
|