我一直試圖在Java中使用同樣使用「\ n」去下一行,但它似乎並沒有在此腳本工作。ASP C#基本的mailto功能
'\ n'不起作用,但整個功能沒有它。
我的問題是你如何去下一行?
String text_name = Text_Name.Text;
String text_email = Text_Email.Text;
String text_message = Text_Message.Text;
ClientScript.RegisterStartupScript(this.GetType(), "mailto",
"<script type = 'text/javascript'>parent.location='mailto:" + "[email protected]" +
"?subject=" + "Inquiry" +
"&body=" +
"Contact Name: " + text_name + '\n' +
"Contact By: " + text_email + '\n' +
"Inquiry: " + text_message + '\n' +
"'</script>");
編碼這樣 「Environment.NewLine」? – 2012-07-24 15:58:09
就是這樣! – 2012-07-24 15:59:01