JS置換テキストエリア内の返却例


 
<html>
<head>
<title> </title>
<script type="text/javascript">
function aa()
{
s=form1.t1.value;
s=s.replace(//n|/r/g,"");// g , 、
form1.t1.value=s;
}
</script>
</head>
<body>
<form name="form1">
<textarea name="t1" style="height: 74px"></textarea>
<input type="button" value="aa" onclick="aa()">
</form>
</body>
</html>