亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

JS替換文本域內(nèi)的回車示例

 更新時(shí)間:2014年02月18日 15:47:28   作者:  
這篇文章主要介紹了JS如何替換文本域內(nèi)的回車,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

<html>
<head>
<title>無標(biāo)題文檔</title>
<script type="text/javascript">
function aa()
{
s=form1.t1.value;
s=s.replace(//n|/r/g,"");// 加上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>

相關(guān)文章

最新評(píng)論