課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
輸出12.008e2 ,0x24, 078, 0xafe
2016-03-13
源自:JavaScript入門篇 2-4
正在回答
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>document.write</title>? <script type="text/javascript">?? a = 0xafe;?? document.write("0xafe轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");?? a = 12.008e2;?? document.write("12.008e2轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");?? a = 0x24;?? document.write("0x24轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");?? a = 078;?? document.write("078轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");? </script></head><body></body></html>
三年二班的阮姑娘 提問者
慕粉15918986194
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
1 回答關(guān)于backgroundColor,只能使用十六進(jìn)制編碼的顏色進(jìn)行設(shè)置嗎
1 回答js重復(fù)輸出
6 回答js輸出問題
1 回答js編程改寫樣式
1 回答JS輸出內(nèi)容中如何輸出空格
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-03-13
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>document.write</title>
? <script type="text/javascript">
?? a = 0xafe;
?? document.write("0xafe轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");
?? a = 12.008e2;
?? document.write("12.008e2轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");
?? a = 0x24;
?? document.write("0x24轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");
?? a = 078;
?? document.write("078轉(zhuǎn)為10進(jìn)制為:"+a.toString(10)+"<br>");
? </script>
</head>
<body>
</body>
</html>