代码
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Del(Word) {
a = Word.indexOf("<");
b = Word.indexOf(">");
len = Word.length;
c = Word.substring(0, a);
if(b == -1)
b = a;
d = Word.substring((b + 1), len);
Word = c + d;
tagCheck = Word.indexOf("<");
if(tagCheck != -1)
Word = Del(Word);
return Word;
}
function Check() {
ToCheck = document.form.text.value;
Checked = Del(ToCheck);
document.form.text.value = Checked;
return false;
}
// End -->
</SCRIPT>
<form action="test.html" name=form onSubmit="return Check()">
<textarea cols="50" rows="6" name="text"></textarea>
<br>
<input type="submit" value="递交">
</form>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Del(Word) {
a = Word.indexOf("<");
b = Word.indexOf(">");
len = Word.length;
c = Word.substring(0, a);
if(b == -1)
b = a;
d = Word.substring((b + 1), len);
Word = c + d;
tagCheck = Word.indexOf("<");
if(tagCheck != -1)
Word = Del(Word);
return Word;
}
function Check() {
ToCheck = document.form.text.value;
Checked = Del(ToCheck);
document.form.text.value = Checked;
return false;
}
// End -->
</SCRIPT>
<form action="test.html" name=form onSubmit="return Check()">
<textarea cols="50" rows="6" name="text"></textarea>
<br>
<input type="submit" value="递交">
</form>