jQuery方法:
.ready():声明一个函数,当DOM完全加载后运行函数
.click():为匹配的函数设置click事件处理程序
.ajax():jQuery的Ajax工具函数
.addClass():为匹配的元素集添加一个CSS
.removeClass():为匹配的元素集移除一个CSS
.attr():获取或者设置指定属性的值
.html():获取或者设置匹配的第一个与元...
分类:
Web程序 时间:
2014-10-09 17:18:43
阅读次数:
194
JQuery获取选中的radio $radio = $('input:radio[name="sex"][class="xxxx"]:checked')获取name=“sex”且calss=“xxxx”且被选中的radioJquery选中或取消radio $("selecter").attr("ch...
分类:
Web程序 时间:
2014-10-09 17:12:17
阅读次数:
207
最近做项目发现jQuery对checkbox的全选和非全选操作只有第一次生效,以后就不生效了,不知道是不是jQuery版本库的问题,最终找到了一个解决方案:把原来的下面这两句:$('input').attr('checked','checked');$('input').attr('checked'...
分类:
Web程序 时间:
2014-10-09 01:59:17
阅读次数:
310
$("#handmoney").attr("readonly","readonly"); 只读 $("img").attr("width","180");设置图片宽度 $("img").attr({width:"50",height:"80"});设置宽和高 $("ul").attr("title....
分类:
其他好文 时间:
2014-10-09 00:45:07
阅读次数:
357
跟进jquery的代码进行检查,发现问题出在下面的代码中:if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( rboolean.test( nam...
分类:
Web程序 时间:
2014-10-09 00:16:27
阅读次数:
193
jquery执行全选/全不选的操作<scripttype="text/javascript">$(function(){$(‘#checkAll‘).click(function(){$(‘:checkbox‘).attr("checked",this.checked);});})</script>但是发现在1.10.0(其它版本未知),前两次都可以正常工作,但是第三次却不能。后面找到解..
分类:
Web程序 时间:
2014-10-07 21:19:54
阅读次数:
170
C++11提供了thread,但是过于复杂,我们还是倾向于在项目中编写自己的Thread。 Posix Thread的使用这里不再赘述。 重点是这个函数: #include int pthread_create(pthread_t *thread, const pthread_attr_t *att...
分类:
系统相关 时间:
2014-10-06 20:00:30
阅读次数:
241
条件变量主要用于实现线程之间的协作关系。 pthread_cond_t常用的操作有: int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread...
分类:
系统相关 时间:
2014-10-06 19:16:50
阅读次数:
182
$("#wanwan").animate({ opacity: 'toggle' }, "slow", null, function () {$("#wanwan").attr("src", "images/back_1.gif");$("#wanwan").animate({ opacity: '...
分类:
Web程序 时间:
2014-10-05 23:55:19
阅读次数:
291
部长练习jquery的属性
.bor{border:10px solid yellow;}
.red{color:red;}
$(document).ready(function(e) {
//增加属性居中
//$('div').attr('align','center');
//设定多个属性
$('div').attr({'alig...
分类:
Web程序 时间:
2014-10-05 18:25:08
阅读次数:
233