在這段代碼中,當編寫'FirstText'
時,第一行的其餘部分被跳過。然後'SecText'
寫在第2行:JavaScript換行符問題
<pre>
<script>
function text(){
document.write("FirstText \n SecText");
}
text();
</script>
</pre>
但是,當我打開該功能setInterval()
,話是彼此相鄰書面(線不會被忽略)。
有什麼建議嗎?
你需要另一個\ n SecText後? –
你需要一個
:'document.write(「FirstText
SecText」);' – Utopik