摘要: /* cookie */ Cookie 是一些数据, 存储于你电脑上的文本文件中。 当 web 服务器向浏览器发送 web 页面时,在连接关闭后,服务端不会记录用户的信息。 读取Cookie: 在 JavaScript 中, 可以使用以下代码来读取 cookie: var x = document. 阅读全文
posted @ 2020-05-08 15:12 幻景 阅读(148) 评论(0) 推荐(0) 编辑
摘要: var IframeOnClick = { resolution: 500, iframes: [], interval: null, Iframe: function() { this.element = arguments[0]; this.cb = arguments[1]; this.has 阅读全文
posted @ 2020-04-24 16:12 幻景 阅读(2379) 评论(0) 推荐(0) 编辑
摘要: copytext("需要复制的内容",function(){ alert("复制成功!");});function copytext(txt,cd){ var Url2 = txt; var oInput = document.createElement('input'); oInput.value 阅读全文
posted @ 2020-03-26 10:35 幻景 阅读(314) 评论(0) 推荐(0) 编辑
摘要: if(navigator.appName "Microsoft Internet Explorer" && parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE","")) <9){//如果等于ie 阅读全文
posted @ 2020-03-26 10:21 幻景 阅读(130) 评论(0) 推荐(0) 编辑
摘要: window.onload = function(){ var D1 = new yzzMethod(); D1.upload('参数');};function yzzMethod(){ this.status = new Object(); console.log('初始化的时候会运行到这里'); 阅读全文
posted @ 2019-12-17 10:24 幻景 阅读(162) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML><html><head> <title>用JS实现汉字转拼音</title> <meta charset="utf-8" /> </head><body>请输入:<input type="text" id="J_input" /><br/><br/><input typ 阅读全文
posted @ 2019-12-02 11:14 幻景 阅读(724) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript">/* 拿到背景 */var url=$('.wrap').css('backgroundImage');/* 正则删掉不需要的信息,保留图片的链接 */var s = url.match(/url\((.*?)\)/);/* 返回一个数据 阅读全文
posted @ 2019-11-18 18:43 幻景 阅读(1070) 评论(0) 推荐(0) 编辑
摘要: ;(function($,window){ function commonYzzFn(){ var _t = this; _t.init = function(param){ var before_foo = param.before; var after_foo = param.after; be 阅读全文
posted @ 2019-11-05 18:31 幻景 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1.多个文件下载 <?php /* 把知道的图片问题名字做成一个数组 */ $mp4 = ['123','456']; /* count($mp4) 类似于 js 的 $mp4.length */ for ($i=1; $i<=count($mp4); $i++){ /* 线上的资源文件 */ $u 阅读全文
posted @ 2019-10-29 11:15 幻景 阅读(272) 评论(0) 推荐(0) 编辑
摘要: target定义(英译:目标,目的): target 事件属性可返回事件的目标节点(触发该事件的节点),如生成事件的元素、文档或窗口。 语法: event.target event.target.nodeName //获取事件触发元素标签name(li,p...) event.target.id / 阅读全文
posted @ 2019-09-04 16:31 幻景 阅读(503) 评论(0) 推荐(0) 编辑