2014年4月21日 星期一

避免特殊字元錯誤,去除跳脫字元

//避免特殊字元錯誤,去除跳脫字元 $contents = str_replace('\\','',$editor1); $gist = str_replace("\\","",$gist); $gist = str_replace('"',"''",$gist); $docNo = str_replace("\\","",$docNo); $docNo = str_replace('"',"''",$docNo); $keyword = str_replace("\\","",$keyword); $keyword = str_replace('"',"''",$keyword);

2014年4月14日 星期一

table 換行變色

2014年3月4日 星期二

js 傳入字串有單引號

檢查,若傳入字串有單引號,加上一個單引號,最後回傳字串 function check_quotation(str_txt) { str_txt=str_txt.replace(/\'/g,"''"); return str_txt; }

javascript trim

keyword = keyword.replace(/^\s+|\s+$/gm,'');