<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">孝颤
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=UTF-8"唤慎中>
<title>Document</title>
<script>
window.onload=function()
{
var oTxt1=document.getElementById('txt1')
document.onkeydown=function(ev)
{
var oEvent=ev||event
if(oEvent.keyCode==13)
{
oTxt1.value+="<br/>"
}
}
}
</script>
</head>
<body>
<input type="text" name="" id="txt1" 和山/>
</body>
</html>
$(""textarea).bind('input propertychange', function () {var len = $(this).val().length
if(len % 15 == 0){
//添键昌加洞亮好换行纳铅符逻辑
}
})
var str = "温馨提示:您的手机已于2017-10-14 7:30分欠费20元;档稿您的手机已于2017-10-14 8:30分欠费30元;您的手机已行答孝于2017-10-14 9:30分欠费40元;举凳"var reg = /[;]/g
str=str.replace(reg,"$&\r\n")
console.log(str)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)