急:在线求答案
当文本框onBlur后,如何把里面的 <> 替换成**啊?
------解决方案--------------------精简些
<html>
<body>
<script>
function replace(obj){
var str=obj.value;
var key=/\ <|\> /g;
obj.value=str.replace(key, "* ");
}
</script>
<input type= "text " onblur= "replace(this) " />
</body>
</html>