分享与定时自动跳转

admin4年前前端技术836
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>My test</title>
</head>
<body>
	       <script src="js/jquery.min.js"></script> 
<div id="txt"></div>
         <a href="https://www.163.com"><span>ppp</span></a>
	       <div id="xs_my">
<div id="fb-root"></div>
 



<div class="fb-share-button" data-href="https://www.eobdmall.com/product_content.php?product_id=1015" data-layout="button_count" data-size="large"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://www.eobdmall.com/product_content.php?product_id=1015;src=sdkpreparse" class="fb-xfbml-parse-ignore">分享</a></div>
</div>
<script type="text/javascript">
$(".fb-share-button").click(function(event) {

       setTimeout(function() {
        $("#xs_my").html('<button type="button" onclick="timedText()">see my </button>') 
    }, 5000);
  
});


function timedText(){
  var x=document.getElementById('txt');
  var t1=setTimeout(function(){$("#txt").html("2 秒")},2000);
  var t2=setTimeout(function(){$("#txt").html("4 秒")},4000);
  var t3=setTimeout(function(){$("span").click()},6000);
}

</script>

</body>
</html>


<a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank">
  Share on Facebook
</a>


<script type="text/javascript">
 // $(document).ready(function() {
 //     setTimeout(function() {
 //  $("span").click();
 //    }, 1000);
  
 
 // });
 
</script>


相关文章

jquery默认设置第一个类的css或者属性

var me=$("#cima>input");me.eq(0).css...

js与jquery自动触发a链接的方法

自动触发a链接的方法如下:1.<body >  <a  href="http://www.shengmake.net"&...

javascript获取cookie

//获取cookie function getcooki(name) { var name=name+"="; var mine=do...

原生javascrip 复制功能

兼容chrome FIrfox IE 下载地址000.zip代码如下:<!DOCTYPE html> <html> <head> &nbs...

jquery如何获取div里面value的值以及原生写法

jquery写法$(this).attr("value")原生写法var value = document.getElementById(""+id+"...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。