
javascript
aqgsh
在这里好好学习吧!
展开
-
JS实现Trim()
//js去除空格函数//此处为string类添加三个成员String.prototype.Trim = function(){ return Trim(this);}String.prototype.LTrim = function(){return LTrim(this);}String.prototype.RTrim = function(){return RTrim(this);}转载 2012-06-19 18:28:42 · 664 阅读 · 0 评论 -
jQuery取得select选择的文本与值
jquery获取select选择的文本与值获取select :获取select 选中的 text : $("#ddlregtype").find("option:selected").text();获取select选中的 value: $("#ddlregtype ").val();获取select选中的索引: $("#ddlregtype "转载 2012-07-07 21:07:34 · 1658 阅读 · 0 评论 -
FCKeditor获取内容(包含html字符及不包含html字符),设置HTML内容,获取焦点
FCKeditor获取带HTML格式符的内容;FCKeditorAPI.GetInstance("编辑器id").GetXHTML();FCKeditor获取纯文本不含HTML格式符的内容FCKeditorAPI.GetInstance("编辑器id").EditorDocument.body.innerText; FCKeditor设置HTML内容FCKedito原创 2012-11-25 03:41:43 · 2700 阅读 · 0 评论 -
js 去除最后一个,
var s = "1,2,3,4,5,"//取以下中的一种s = s.substr(0, s.length - 1);s=s.replace(/,$/, "")alert(s);原创 2012-12-15 00:55:00 · 1307 阅读 · 0 评论 -
js对象转换为数组
var a = { a1: 'a11' , a2: 'a22' , a3: 'a33' };var ary = [];for (var s in a){ ary[ary.length] = a[s];}原创 2014-11-01 17:25:25 · 938 阅读 · 0 评论 -
jquery获得select option的值 和对select option的操作
jQuery获取Select元素,并选择的Text和Value: 1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 2. var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text转载 2014-10-18 14:05:45 · 821 阅读 · 0 评论