var str = "abc\r\nabc\r\nabc";
var re = /(\r\n)/g;
str=str.replace(re,"\n");
解决方案 »
- swfupload的问题……如何获得图片预览???
- 想通过反射机制,得到String,Array等类的信息
- FF中,怎么弹不出任何内容??
- 选择列表框后值进入文本框 ,有点小错误求助
- 一个javascript中需要理解的东西,请大家指教
- 大家帮助我要实现一下面FORM中每一项的断.都为必填项,我想用循环.
- 如何终止一个<script>的运行!
- 怎么用脚本控制提交?
- 我想在html中加activex显示图象(imgedit.ocx),可加后图象就是不出来,如何解决?
- 请教JQuery easyui-tree的一个问题
- 为什么正则表达式 "5.0".match(/([\d.])+/i) 返回的数组[1]结果是0,而不是5呢?
- google.maps.Geocoder反向地址解析怎么得到英文地址?
$("#Content").val() = $("#Content").val().replace(/\r\n/g, '\n');我这么写,页面提示错误:Cannot Assign to function result错误在什么地方?
$("#Content").val() = $("#Content").val().replace(/\r\n/g, '\n');我这么写,页面提示错误:Cannot Assign to function result错误在什么地方?$("#Content").get(0).value = $("#Content").val().replace(/\r\n/g, '\n');
$("#Content").val() = $("#Content").val().replace(/\r\n/g, '\n');我这么写,页面提示错误:Cannot Assign to function result错误在什么地方?$("#Content").get(0).value = $("#Content").val().replace(/\r\n/g, '\n');程序一提交,到后台取到的值又是 /r/n,咋回事?
$("#Content").val() = $("#Content").val().replace(/\r\n/g, '\n');我这么写,页面提示错误:Cannot Assign to function result错误在什么地方?
$("#Content").val($("#Content").val().replace(/\r\n/g, '\n'));
$("#Content").val() = $("#Content").val().replace(/\r\n/g, '\n');我这么写,页面提示错误:Cannot Assign to function result错误在什么地方?
你大爷的,jquery赋值是你这样写的吗?
$("#Content").val($("#Content").val().replace(/\r\n/g, '\n'));