alert換行\n沒用要\\n

 


透過C#(asp.net)後端註冊javascript時候有時
要alert警示跳窗內容需要換行



此時後端加上換行要記得用 \\n  (要兩反斜線)






Ref:
C#換行
http://kingofamani.blogspot.com/2015/01/javascript-alert.html

Javascript "Alert" From Code Behind
https://www.dreamincode.net/forums/topic/85980-javascript-alert-from-code-behind/

New line in JavaScript alert box
https://stackoverflow.com/questions/1841452/new-line-in-javascript-alert-box?rq=1

New line in text in javascript alert(\n is not working also <br />) 
https://forums.asp.net/t/1534698.aspx?New+line+in+text+in+javascript+alert+n+is+not+working+also+br+

留言

這個網誌中的熱門文章

何謂淨重(Net Weight)、皮重(Tare Weight)與毛重(Gross Weight)

Architecture(架構) 和 Framework(框架) 有何不同?_軟體設計前的事前規劃的藍圖概念

(2021年度)駕訓學科筆試準備題庫歸納分析_法規是非題