/**
* 替換字符串中所有
* @param obj 原字符串
* @param str
* @param str
* @return 替換後的字符串
*/
function replaceAll(obj
var result = obj
return result;
}
例如
<!DOCTYPE HTML PUBLIC "
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript">
function replaceAll(obj
var result = obj
return result;
}
alert(replaceAll("
</script>
</head>
<body>
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20093.html