lwngreat

1.jquery实现替代iframe的功能

<ul class="list-side">
  <li><a target="a.html" >about</a></li>
  <li><a target="b.html" >news</a></li>
  <li><a target="c.html" >product</a></li>
  <li><a href="http://ucmic.blogspot.com/" target="_blank" >contact</a></li>
</ul>
 
<div id="iframe">
  <!--jquery 插入html 位址-->
</div>
//实现功能的Javascript代码
$(document).ready(function(){ 
  $.get("a.html",function(data){ //初始將a.html include div#iframe
    $("#iframe").html(data);
  }); 
$(function(){
  $(\'.list-side li\').click(function() {
    // 找出 li 中的超链接 href(#id)
     var $this = $(this),
     _clickTab = $this.find(\'a\').attr(\'target\'); // 找到链接a中的targer的值
     $.get(_clickTab,function(data){
       $("#iframe").html(data); 
     });
  });
});

 2.jquery实现剪切板功能

  一.    https://github.com/zeroclipboard

  二.  zeroclipboard.js  https://github.com/zeroclipboard/zeroclipboard  (我觉的这个好用一些)

 

分类:

技术点:

相关文章:

  • 2022-03-01
  • 2021-09-17
  • 2021-10-08
  • 2022-02-07
  • 2022-02-08
  • 2022-02-08
  • 2022-02-08
  • 2022-02-02
猜你喜欢
  • 2022-12-23
  • 2021-09-12
  • 2021-10-21
  • 2021-12-13
  • 2022-03-04
  • 2022-01-21
相关资源
相似解决方案