678PDF
首页
软件
博客
工具箱
注册
登录
b
bg7zag 的博客
cqcqcq,这里是BG7ZAG,会coding的HAM,分享生活趣事、建站技术、前端开发、汽车相关、deepin系统、业余无线电等!73!
bg7zag · 注册于 2026-09-17 · 457 博文 · 0 帖子 · 0 回复
博文 (457)
帖子 (0)
筛选: 标签「js」
✕ 清除
文字滚动效果
在网络上找到的这个效果,核心代码: 1. <script type="text/javascript"> 2. function autoScroll(obj) { 3. 4. $(obj).find("ul").animate({ 5. 6. marginTop: "-39px...
2026-09-17
👁 2
💬 0
js
文字滚动
鼠标向上、向下滚动时执行事件
原理:拿当前的scrollTop和之前的scrollTop对比 如果变大了,表示向下滚动(scrollTop值变大); 如果变小了,表示向上滚动(scrollTop值变小)。 1. $(document).ready...
2026-09-17
👁 2
💬 0
js
scroll
scrollTop
鼠标滚动
js点击复制文字或链接方法
js点击复制一段文字或者链接: 1. $('#btn').click(function(e){ 2. let url = e.currentTarget.dataset.url; 3. $("body").after("<textarea cols='1' rows='1' id='co...
2026-09-17
👁 3
💬 0
JavaScript
js
复制文字
复制链接
点击事件
paging.js插件翻页
在需要添加分页的地方添加以下html代码: 1. <div id="page"></div> js代码: 1. $("#page").paging({ 2. pageNo: that.page, // 传入初始 3. totalPage: that.totalPag...
2026-09-17
👁 1
💬 0
js
paging
paging.js
翻页
JS原生滚动到指定元素位置
使用JS原生API Element.scrollIntoView() ;(有部分浏览器不支持) https://developer.mozilla.org/zh-CN/docs/Web/API/Element/scrollIntoView > Element.scrollIntoV...
2026-09-17
👁 1
💬 0
JavaScript
js
滚动
vue 中对城市列表根据首字母进行排序
vue中根据城市的首字母a-z进行排序 先安装 js-pinyin 依赖: ``` npm i --save js-pinyin ``` 然后在组件中引入: ``` import pyjs from 'js-pinyin' export default { a...
2026-09-17
👁 1
💬 0
JavaScript
js
Vue
城市列表
排序
js导出Excel时长数字或者倒数第二位是e的长数字自动变成科学计数法问题
https://blog.bg7zag.com/wp-content/uploads/2021/06/1622705671-截图_选择区域_20210603153158.png 解决方法: ``` <td style="mso-number-format:'\@';">21053007163...
2026-09-17
👁 1
💬 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
👁 1
💬 0
js
round
toFixed
四舍五入
银行家舍入
JS ES6数组的两个值替换位置
在 ES6 中,你可以使用数组解构赋值来交换数组中两个值的位置。以下是一个示例: ``` let array = [1, 2, 3, 4]; [array[0], array[1]] = [array[1], array[0]]; consol...
2026-09-17
👁 1
💬 0
es6
js
数组
替换位置
xlsx.js 设置默认A4纸张类型
本方法适用于下载到本地的文件的`xlsx.js` 1. 找到xlsx.core.min.js文件 2. 搜索write_ws_xml_pagesetup方法 3. 找到下面这行 ``` write_ws_xml_pagesetup(setup){var p...
2026-09-17
👁 1
💬 0
A4纸
Excel
js
xlsx
xlsx.js
更多 »
分类
全部
程序开发
HAM
电脑&系统
网站建设
包罗万象
汽车相关
标签云
JavaScript
deepin
Vue
H5学习
越野路书
深度操作系统
小程序
jQuery
js
docker
Node.js
萝卜报告
MongoDB
业余无线电
宝塔
CSS
Linux
Ajax
window对象
git
HAM
上传图片
rust
nginx
深度系统
凌派
docker compose
axum
越野路书第九季
nuxt