jquery 操作大全
2016-02-19 15:23
621 查看
1添加属性
$("#mydiv").attr("pro1","this is val");
$('.img1').attr('src', '/img/1.jpg');
2设置样试
$("#mydiv").css("width","100px");
3操作json取值
var jsonstr="Result:{"pagecount":"5","pagesize":"5","pageindex":"1","pic":["/image/g1.jpg","/image/g2.jpg","/image/g3.jpg","/image/g4.jpg","/image/g5.jpg"]}";
var contact = JSON.parse(jsonstr);
alert(contact.pagecount);
$("#mydiv").attr("pro1","this is val");
$('.img1').attr('src', '/img/1.jpg');
2设置样试
$("#mydiv").css("width","100px");
3操作json取值
var jsonstr="Result:{"pagecount":"5","pagesize":"5","pageindex":"1","pic":["/image/g1.jpg","/image/g2.jpg","/image/g3.jpg","/image/g4.jpg","/image/g5.jpg"]}";
var contact = JSON.parse(jsonstr);
alert(contact.pagecount);
相关文章推荐
- jQuery全屏滚动插件fullPage.js
- jquery获取当前日期的方法
- jquery根据name取值
- ResponsiveSlides 微型响应式幻灯片 jQuery 插件
- 使用easydrag实现可拖动的DIV弹出框
- jquery.hoverdir.js图片悬停插件
- jquery分页插件生成后填充链接
- YII2+jquery.Fileupload 文件上传
- jquery not() 方法
- 理解jquery的$.extend()、$.fn和$.fn.extend()
- jQuery元素的追加和删除
- jquery方法focusin/focusout的使用
- Javascript、Jquery获取浏览器和屏幕各种高度宽度
- 用户界面框架jQuery EasyUI示例大全之DataGrid(3/4)
- jQuery filter() , end()
- jQuery实现简单的DIV拖动效果
- 编写jQuery插件的方法
- jquery获取input的值
- jQuery UI dialog插件出错信息:$(this).dialog is not a function
- JQuery获取select值