![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
H___want
积少成多
展开
-
js点击a标签,打开新窗口预览图片
const imgSrc= '图片路径'var el = document.createElement("a");el.target = "_blank"; el.href = 'http://xxx?spUrl='+imgSrc; $("body").append(el)//将a标签插入页面el.click()//点击a标签实现跳转$(el).remove()//移除a标签原创 2021-08-10 16:48:02 · 3748 阅读 · 0 评论 -
(前端)js 获取到秒的时间戳
var time = Date.parse( new Date() ).toString(); //精确到毫秒time = time.substr(0,10); //精确到秒原创 2021-04-29 10:04:31 · 2955 阅读 · 0 评论