Menu
I”m attemmpting to build a javascript which generates the HTML for the current page, but with all of the scripts removed. I beleive I’m on the right track, but I’m guessing there might be something wrong with my regular expression. Running the code below simply gives me the unmodified HTML for the current site. Suggestions??
<html>
<head>
<script type=”text/javascript”>
function getFirst500()
{
alert( (document.getElementsByTagName(“HTML”)[0].innerHTML).replace(/<script.*script>/ig, “”) );
}
</script>
</head>
<body>
<form>
<input type=”button” value=”Remove Scripts” onclick=”getFirst500()” >
</form>
</body>
</html>