汇成软件 Create the world!!!

webpack全局安装了,使用命令时却提示安装脚手架

全局安装了webpack ,使用webpack的时候,却有如下的提示


One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
 - webpack-cli (https://github.com/webpack/webpack-cli)
   The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): n
You need to install 'webpack-cli' to use webpack via CLI.
You can also install the CLI manually.
作者:admin 分类:前端技术 浏览:743 评论:0

分享与定时自动跳转

<!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>
作者:admin 分类:前端技术 浏览:552 评论:0

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

自动触发a链接的方法如下:

1.

<body >
 <a  href="http://www.shengmake.net" ><span>Affiliate</span></a> 
</body>
<script src="jquery-3.6.0.min.js"></script>

<script type="text/javascript">
 $(document).ready(function() {
     setTimeout(function() {
  $("span").click();
    }, 1000);
  
 
 });
 
</script>
作者:admin 分类:前端技术 浏览:522 评论:0

JQuery 两种方法解决刚创建的元素遍历不到的问题

刚创建的元素,使用jQuery的each方法来遍历,有时候会不起作用。
原因不用多说,经常使用javascript的人应该都会知道,解决方案大致有2种:

作者:admin 分类:前端技术 浏览:573 评论:0

javascript获取cookie

//获取cookie
function getcooki(name) {
var name=name+"=";
var mine=document.cookie.split(';');
var c=mine[0].trim();
var last=c.substring(name.length,c.length);
return last 
}
作者:admin 分类:前端技术 浏览:601 评论:0