随笔分类 -  JavaScript

摘要:<script> const music = new Audio('med/CanonInD.mp3'); music.loop =true; document.addEventListener("DOMContentLoaded", function(event) { console.log("页 阅读全文
posted @ 2024-05-13 22:11 wsh3166Sir 阅读(55) 评论(0) 推荐(0) 编辑
摘要:网页客户端 : <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" con 阅读全文
posted @ 2024-01-06 17:11 wsh3166Sir 阅读(9) 评论(0) 推荐(0) 编辑
摘要:引入jS<script type="text/javascript" src="/Public/js/jquery.2.2.4.min.js"></script> <script type="text/javascript" src="/Public/js/jquery.table2excel.js 阅读全文
posted @ 2023-08-25 13:00 wsh3166Sir 阅读(171) 评论(0) 推荐(0) 编辑
摘要:// 看到一张以前的笔记,再一看还是很容易明白。 //https://github.com/getify/You-Dont-Know-JS/blob/1ed-zh-CN/async%20%26%20performance/ch3.md let p5= new Promise((resolve,rej 阅读全文
posted @ 2022-06-27 16:27 wsh3166Sir 阅读(22) 评论(0) 推荐(0) 编辑
摘要:// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @autho 阅读全文
posted @ 2022-04-04 19:18 wsh3166Sir 阅读(229) 评论(1) 推荐(0) 编辑
摘要:/* B站的播放器标签不是固定的 */ let myv=document.getElementsByTagName("VIDEO") let myv=document.getElementsByTagName("BWP-VIDEO") for (i in myv[0]){ console.log(i 阅读全文
posted @ 2022-04-03 19:29 wsh3166Sir 阅读(70) 评论(0) 推荐(0) 编辑
摘要:function youzhi(exp) { if (!exp && typeof exp != "undefined" && exp != 0) { //alert(“is null”); return false; } if (typeof exp == "undefined") { // al 阅读全文
posted @ 2022-04-01 21:04 wsh3166Sir 阅读(32) 评论(3) 推荐(0) 编辑
摘要:// F12,给要拖动的标签加个id my_wsh,然后控制运行如下JS即可实现标签拖放 var box = document.getElementById("my_wsh"); //获取元素 var x, y; //鼠标相对与div左边,上边的偏移 var isDrop = false; //移动 阅读全文
posted @ 2022-03-18 15:22 wsh3166Sir 阅读(253) 评论(3) 推荐(0) 编辑

点击右上角即可分享
微信分享提示