如何在輸出中使用break行? document.write
有問題。在document.write()輸出中使用換行符
請仔細閱讀我的代碼,並給我最好的解決辦法..
<html>
<head>
<script type="text/javascript">
function FahToCent (degFah)
{
var degCent = new Array();
for (var loopCounter = 0; loopCounter <=2; loopCounter++)
{
degCent[loopCounter] = 5/9 * (degFah[loopCounter] - 32);
}
return degCent;
}
</script>
</head>
<body>
<script type="text/javascript">
var degFah = new Array();
for (var loopCounter = 0; loopCounter <= 2; loopCounter++)
{
degFah[loopCounter] = prompt ("Enter Temperature in Fahrenheit");
}
document.write (FahToCent (degFah)+"<br>");
</script>
</body>
</html>
看到帖子 – 2013-02-11 08:39:33
有誰還在用'document.write'的頂部? – 2013-02-11 08:41:48
可能重複[如何在Javascript中創建新行?](http://stackoverflow.com/questions/5758161/how-do-i-create-a-new-line-in-javascript) – mthomas 2014-03-04 12:44:45