function htmlEscape(str) {
    return str
        .replace(/&/g, '&')
        .replace(/"/g, '"')
        .replace(/'/g, ''')
        .replace(/</g, '<')
        .replace(/>/g, '>');
}
// I needed the opposite function today, so adding here too:
function htmlUnescape(str){
    return str
        .replace(/"/g, '"')
        .replace(/'/g, "'")
        .replace(/</g, '<')
        .replace(/>/g, '>')
        .replace(/&/g, '&');
}2017年9月28日 星期四
javascript 特殊符號轉換
訂閱:
張貼留言 (Atom)
remove last word from SQL query
SET @columnSql = SUBSTRING ( @columnSql , 1 , LEN ( @columnSql ) - 1 )
- 
解決 Visual Studio 無法叫用中斷點 原始程式碼與原始版本不同 1.把 Visual Studio 關掉 2.把專案中的 bin obj 資料夾刪掉 3.重開 Visual Studio 並建置 完成
- 
SET @columnSql = SUBSTRING ( @columnSql , 1 , LEN ( @columnSql ) - 1 )
- 
//// 定義日期字串 string dateString = "2018/03/10" ; //// 字串 -> DateTime DateTime datetime = Convert . ToDateTime ( dateString )...
 
沒有留言:
張貼留言