分享与定时自动跳转

admin4年前前端技术830
<!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 生成的dom无法触发click事件的解决方案

原因是程序找不到此节点在jQuery中有“向未来的元素添加事件处理程序”方法说明,也正是动态创建元素无法触发事件的原因所在。正确的写法应该是:$(‘父元素’).on(‘click’,’动态的子元素’,...

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

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

当div里的height:atuo不能实现高度自适应的时候

当div里的height:atuo不能实现高度自适应的时候添加如下代码就可以实现overflow:hidden;/*解决了flat left 漂浮,让高度不可控的问题*/...

通过jquery开发导航下来菜单

核心知识是用jquery的hover方法去实现,动画效果是slideDown与slideUp代码下载地址:点击下载...

ueditor在php环境实现绝对路径存储,实现cookie指定目录,加域名前缀,实现了独立部署图片站点的功能完成,可以实现完全静态化的操作,大大提高服务器的安全性

ueditor在php环境实现绝对路径存储,实现cookie指定目录,加域名前缀,实现了独立部署图片站点的功能完成,可以实现完全静态化的操作,大大提高服务器的安全性

ueditor在php环境实现绝对路径存储,加域名前缀,实现了独立部署图片站点的功能完成,可以实现完全静态化的操作,大大提高服务器的安全性重点修改部位php/config.json  的11...

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

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

发表评论    

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