码迷,mamicode.com
首页 >  
搜索关键字:val    ( 23217个结果
jquery获得下拉框值的代码
jquery获得下拉框值的代码获取Select :获取select 选中的 text :$("#ddlRegType").find("option:selected").text();获取select选中的 value:$("#ddlRegType ").val();获取select选中的索引:$(...
分类:Web程序   时间:2014-05-27 02:38:48    阅读次数:270
get the text value of a selected option.
1 1, get value:$( "#myselect" ).val();//=> 12, get (inner)text:$( "#myselect option:selected" ).text();// => "Mr"ref:How do I get the text value of a ...
分类:其他好文   时间:2014-05-27 02:25:09    阅读次数:223
js 删除
/**方法:Array.remove(dx)*功能:根据元素值删除数组元素.*参数:元素值*返回:在原数组上修改数组*作者:pxp*/Array.prototype.indexOf=function(val){for(vari=0;i-1){this.splice(index,1);}};/**方法...
分类:Web程序   时间:2014-05-24 00:22:05    阅读次数:308
Leetcode ---- Swap Nodes in Pairs
题目链接题意:给出单链表头指针,要求交换链表中每一对相邻的结点.注意:不可以改变链表中结点的值,只可以使用常量空间.附上代码: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val;...
分类:其他好文   时间:2014-05-23 10:43:49    阅读次数:249
[stm32] 中断
1 #include "stm32f10x.h" 2 #include "stm32f10x_tim.h" 3 #include "misc.h" 4 #include "stm32f10x_gpio.h" 5 6 unsigned int CCR2_Val=45000; 7 exte...
分类:其他好文   时间:2014-05-23 10:42:28    阅读次数:298
leetcode:Insert Sort List
问题描述 对一个单链表进行插入排序,head指向第一个结点。 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */...
分类:其他好文   时间:2014-05-22 10:15:43    阅读次数:233
找出单链表的中间位置指针
需求单链表不可以用下标直接得到中间位置,可以采取一前一后(前面的走2步,后面的走一步)的方式实现。参考代码1 struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} ...
分类:其他好文   时间:2014-05-22 00:52:25    阅读次数:376
STL坑汇总
1.Q:vector的push_back()方法到底做了些什么? 为什么声明写的是void push_back (const value_type& val);A:的确,乍一看,似乎push_back方法添加了一个引用。哦,天啊,如果这个引用对象被析构了,那岂不是要出错。官方文档是这样写的Adds ...
分类:其他好文   时间:2014-05-21 20:36:55    阅读次数:408
jquery val() and text().
.val()works on input elements (or any element with a value attribute?) and.text()will not work on input elements..val()gets the value of the input ele...
分类:Web程序   时间:2014-05-19 12:14:34    阅读次数:382
验证字符串空“” 的表达式
if ($(this).val() == "" || $(this).val() == null) { filterString = "";} else { filterString = "^" + replaceRegexStr(filterList[0]) + "$"; for...
分类:其他好文   时间:2014-05-17 22:02:57    阅读次数:253
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!