想用Jscript的"<script language=’javascript’>window.parent.location.href(’"+strUrl+"’);</script>"弹出一个提示框,想将里面的消息换行,搞了半天,“/t”、"/r”、“/r/t”、“
都不行,这才知道JavaScript的转换成这个样子的:“//r//t”
都不行,这才知道JavaScript的转换成这个样子的:“//r//t”
"格式化为JS可解释的字符串
///
/// 格式化为JS可解释的字符串
///
///
///
public static string JSStringFormat(string s)
{
return s.Replace("/r"," //r").Replace("/n","//n").Replace("’","//’").Replace("/"","///"");
}
///
/// 格式化为JS可解释的字符串
///
///
///
public static string JSStringFormat(string s)
{
return s.Replace("/r"," //r").Replace("/n","//n").Replace("’","//’").Replace("/"","///"");
}
"
又学一招,哈哈,高兴!