<iframe ></iframe>';

//iframe加载完成后

$("#iframe").load(function(){

  //设置class="name"的值为jeffson

  $(this).contents().find('.name').val("jeffson");

  //设置class="content"的值为abcdefg

  $(this).contents().find('.content').html("abcdefg");

  //获取class="name"的值

  $(this).contents().find('.name').val();

  //设置单选按钮为选中状态
  $(this).contents().find("input[@type='radio']").attr("checked","true"); 
})

  

利用Jquery获取、设置iframe中元素

相关文章:

  • 2022-02-26
  • 2022-12-23
  • 2021-11-19
  • 2022-02-15
  • 2021-08-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案