建站代码网

热门标签

去除所有JavaScript标记

 function replaceJs($document)

{

$document=trim($document);

if (strlen($document) <= 0) return $document;

$search=array("'<script[^>]*?>.*?</script>'si");

$replac=array("");

return @preg_replace ($search, $replac, $document);

}

 

X