我为条带<script></script>标签创建此表单,但此表单不起作用请任何人修改此表单以开始工作
<html>
<head>
<script language='javascript'>
function alfa(s) {
return s.replace(/<script>[^<\/script>]*<\/script>/g, "");
}
</script>
</head>
<body>
<form>
<textarea name="txt" style="width: 300px; height: 150px"></textarea><br />
<input type="button" value="Remove script tags" onClick="txt.value=alfa (txt.value)">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)