法
法丝 的博客
cqcqcq,这里是BG7ZAG,会coding的HAM,分享生活趣事、建站技术、前端开发、汽车相关、deepin系统、业余无线电等!73!
主页
帖子
博客广场
站点首页
最新博文
文字滚动效果
在网络上找到的这个效果,核心代码: <script type="text/javascript"> function autoScroll(obj) { $(obj).find("ul").animate({ marginTop: "-39px" }, 500, function...
2026-09-17
👁 12
💬 0
js
文字滚动
鼠标向上、向下滚动时执行事件
原理:拿当前的scrollTop和之前的scrollTop对比 如果变大了,表示向下滚动(scrollTop值变大); 如果变小了,表示向上滚动(scrollTop值变小)。 $(document).ready(fu...
2026-09-17
👁 13
💬 0
js
scroll
scrollTop
鼠标滚动
js点击复制文字或链接方法
js点击复制一段文字或者链接: $('#btn').click(function(e){ let url = e.currentTarget.dataset.url; $("body").after("<textarea cols='1' rows='1' id='copyContent...
2026-09-17
👁 13
💬 0
JavaScript
js
复制文字
复制链接
点击事件
paging.js插件翻页
在需要添加分页的地方添加以下html代码: <div id="page"></div> js代码: $("#page").paging({ pageNo: that.page, // 传入初始 totalPage: that.totalPage, //传入总...
2026-09-17
👁 12
💬 0
js
paging
paging.js
翻页
JS原生滚动到指定元素位置
使用JS原生API Element.scrollIntoView() ;(有部分浏览器不支持) https://developer.mozilla.org/zh-CN/docs/Web/API/Element/scrollIntoView Element.scrollIntoVie...
2026-09-17
👁 12
💬 0
JavaScript
js
滚动
vue 中对城市列表根据首字母进行排序
vue中根据城市的首字母a-z进行排序 先安装 js-pinyin 依赖: npm i --save js-pinyin 然后在组件中引入: import pyjs from 'js-pinyin' export default { async mounted...
2026-09-17
👁 11
💬 0
JavaScript
js
Vue
城市列表
排序
js导出Excel时长数字或者倒数第二位是e的长数字自动变成科学计数法问题
https://blog.bg7zag.com/wp-content/uploads/2021/06/1622705671-截图_选择区域_20210603153158.png 解决方法: <td style="mso-number-format:'\@';">210530071635670...
2026-09-17
👁 12
💬 0
Excel
js
js导出
科学计数法
解决js toFixed 四舍五入遇5不进位问题
https://blog.bg7zag.com/wp-content/uploads/2022/10/1666683067-1165e17b117f40c2204d4fc05b9c564f-1.jpeg const a = 7.55; console.log(a.toFixed(1)) // 7.5 比如上...
2026-09-17
👁 11
💬 0
js
round
toFixed
四舍五入
银行家舍入
JS ES6数组的两个值替换位置
在 ES6 中,你可以使用数组解构赋值来交换数组中两个值的位置。以下是一个示例: let array = [1, 2, 3, 4]; [array[0], array[1]] = [array[1], array[0]]; console.lo...
2026-09-17
👁 12
💬 0
es6
js
数组
替换位置
xlsx.js 设置默认A4纸张类型
本方法适用于下载到本地的文件的xlsx.js 找到xlsx.core.min.js文件 搜索write_ws_xml_pagesetup方法 找到下面这行 write_ws_xml_pagesetup(setup){var pageSetup=writex...
2026-09-17
👁 11
💬 0
A4纸
Excel
js
xlsx
xlsx.js
更多 »
法丝 的博客
博客广场
站点首页
© 2026 法丝 的博客 · Powered by 678PDF