30th,七月,2010

json eval()函数优化

var morik={};
morik.eval=function(s){
if(navigator.userAgent.toLowerCase().indexOf(“msie”) > -1)
return eval(s);
else{
var aa=new Function( “return”+s);
return aa.apply(this[......]

继续阅读

26th,七月,2010

正则表达式替换 RegExp replace

<!DOCTYPE html>
<html>
<body>
<a href=”http://www.taobao.com/index_global.php?pid=mm_0_0_0″>0000</a>
<a href=”http://www.taobao.com/index_global.php?pid=mm_123_0_0″&gt[......]

继续阅读