首页 技术 正文
技术 2022年11月7日
0 收藏 963 点赞 541 浏览 1637 个字

jquery  众所周知 ,强大的 js框架

自己使用的一些笔记

  1. //1.json格式定义方法
  2. var product_obj={ 
  3.   check_init:function(){ 
  4.        $("input[name=Name]").blur(function(){ 
  5.        }    
  6.     }
  7. }
  8. //页面调用
  9. $(product_obj.check_init)
  10. //2.给控件绑定事件
  11. $("input[name=Name]").blur(function(){ 
  12.        }  
  13. //3.获取节点,节点属性修改,css修改等
  14. $("input:radio:checked")
  15. $("input:checkbox:checked")
  16. $('#checkout .address dl')
  17. $('#checkout .address dl').css('display', 'none');
  18. $("#address_form").attr({"action":"user_addAddressBook","method":"post"})
  19. $("#a_next").remove();
  20. $(".pro_img .list img").each(function(){
  21.      global_obj.image_init(this,$(this).parent().width(),$(this).parent().height())
  22.  })
  23. $(this).parent()
  24. //4.节点的获取
  25. $("#address_form [name=address_book_mod]")
  26. $("from[name=fileupload]")
  27. //5.引入其他文件
  28. $("#main_order").load("addAddressBook.jsp");
  29. //6.ajax的使用
  30.     
  31. $.ajax({
  32.        type: "POST",
  33.        url: url,
  34.        data: data,
  35.        success: function(msg){
  36.      if(status=="reload"){
  37.       location.reload();
  38.      }else if(status=="html"){
  39.       $(include).html(msg);
  40.      }
  41.        }
  42.    });
  43. //表单的提交
  44. $.post('user_register', $('#user_form').serialize(), function(data){
  45.      if(data[0]=="1"){location.href=data[1]}else if(data[0]=="2"){global_obj.win_alert(data[1])};
  46.    });
  47. //post普通提交
  48. j.post('/oaproveuploadmgr.do', { method:"delprovefile",state: "4" ,msgid:'${msgInfoMap.ID}',userid:'${user.id}',delpath:filepath},function(data){
  49. if(data == 'success'){
  50. j(j(obj).parents("table")[0]).remove();
  51. if(j("#pFileDisplayHtml table").size()==0){
  52. j("#prove_state").html("未证明");
  53. }
  54. }else{
  55. alert(data);
  56. }
  57. });
  58. //多库共存
  59. var j = jQuery.noConflict();
  60. //jquery 关于在ifarme 中获取父窗口的方式
  61. $("input[name=datamsgid]",parent.document).val('<%=request.getAttribute("dataMsgId")%>');
  62. $("form[name=uploadform]",parent.document).remove();
  63. //添加  append

待续……
附件:Jquery js框架使用Jquery js框架使用
自己写的 :

附件列表

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,000
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,512
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,358
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,141
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,771
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,849