<html>
<head>
<script type="text/javascript">
function $(id){
return document.getElementById(id);
}
window.onload = function(){
$("jh").onkeyup = function(e){
e= e || window.event;
if(e.keyCode == 188){
this.value = this.value.replace(/,/img, ",");
}
}
return true;
}
</script>
</head>
<body>
<form name="addFrm" id="addFrm" action=a.asp method=post> 
<textarea name="jh" id="jh" rows=3 cols=40> </textarea> 
</form> 
</body>
</html>
还不太理想,还要解决光标位置,复制等问题