qiqiqiqiqia

1: 根据class 、 id  取 input 标签的value 值 。
                  jQuery     : $(".className").val();  $("#idName").val();
                  javaScript : document.getElementById("idName").value;
       
           2:  根据class 、id 获取标签之间的内容:如 <span> 、<lable> 、<div> 。
                 jQuery     : $("#idName").html(); $(".className").html();
                 javaScript : document.getElementById("idName").innerHTML ;
       
          3: 获取<select id=\'selectId\'> <option value=\'selectValue\'>  选中值:
                 jQuery     : $("#selectId").val();
                 javaScript : document.getElementById("selectId").value;
       
          4: 获取<img > 的 src 内容 :
                jQuery     : $("#imgId")[0].src;
               javaScript : document.getElementById("imgId").src;
       
          5:子界面获取父界面元素内容:
                 5.1 (标签间的内容 ,如 <span> 、<lable> 、<div> )
                       JavaScript : window.parent.document.getElementById("currentPage").innerHTML ;
                       JQuery     : $(window.parent.document).find("#IdName").text();
                 5.2 (取 input 标签的value 值)
                       JavaScript : window.parent.document.getElementById("currentPage").value ;
                       JQuery     : $(window.parent.document).find("#IdName").val();

 

         6:子界面控制父页面跳转:

                      window.parent.location.href = “*” ;

分类:

技术点:

相关文章:

  • 2021-11-21
  • 2021-09-03
  • 2021-08-27
  • 2022-03-01
  • 2022-01-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
相关资源
相似解决方案