在云那方

首页 新随笔 联系 订阅 管理
代码

    
  
<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>   
    

 

posted on 2009-12-28 15:53  Rich.T  阅读(1351)  评论(0编辑  收藏  举报