随笔分类 - Javascript
摘要:.net项目结构: 程序目录结构: vue操作: 前提:安装npm ,vue,vue-cli 1、进入控制台窗口 2、进入程序目录 3、运行 vue init webpack webjs 生成webjs及其子目录 4、cd webjs 5、npm install 安装依赖包 6、修改vue配置文件:
阅读全文
摘要:/(?!.*\[徽\]\[信\]|.*紸 微|.*互动逡|.*qun|.*v辛|.*v信|.*v欣|.*羣|.*裙|.*企业裙|.*亻言|.*微信)^.*$/ig.test('微信')javascript版本,如需其他版本,自行转换var newword = '微信';var sourceWords...
阅读全文
摘要:小贱鸡自动回复API已经不可以用了,现在改良接入图灵机器人API360chrome浏览器团队翻译了部分谷歌插件开发文档地址:http://open.chrome.360.cn/extension_dev/overview.html具体封装插件的方法请参考开发文档。具体代码如下:background....
阅读全文
摘要://加密function MyEncrypt(txt){ var sb = ""; var rand = 0; for (var i=0;i<txt.length;i++) { item=txt.charCodeAt(i); rand = Mat...
阅读全文
摘要:key和iv向量一定要16字节C# public static string Encrypt(string toEncrypt, string key, string iv) { byte[] keyArray = UTF8Encoding.UTF8.Ge...
阅读全文
摘要:function getvl(name) {var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " "));return "";};
阅读全文
摘要:Date.prototype.format = function(format){ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinutes(), //minute "s+" : this.getSeconds(), //second "q+" : Math.floor((this.
阅读全文
摘要:1 HTMLElement.prototype.__defineGetter__("currentStyle", function () {2 return this.ownerDocument.defaultView.getComputedStyle(this, null);3 });example:1 document.body.currentStyle['width']
阅读全文
摘要:客户端JS: 服务端代码: PS:客户端的jsonp参数是用来通过url传参,传递jsonpCallback参数的参数名,比较拗口,通俗点讲: 以正常ajax请求方式就可以获得数据。
阅读全文
摘要:将这一段JS去掉,它是以ajax的方式加载的JS,有些浏览器不允许这样访问JS:1 $.ajax({async:false,type: "GET",url: "../js/theme.js",dataType: "script",2 error :function(){alert('当前皮肤加载出错,请确认皮肤【'+settings.theme+'】是否存在')}3 }); 直接在要验证的页面导入样式JS:1 <script src="../js/theme.js" type=
阅读全文
摘要:1 var comment = {}; 2 comment.postId = 2892826;//每篇博客对应一个唯一的标识ID,必须 3 comment.Body = '123';//评论内容,必须 4 comment.ParentCommentID = 0;//默认0,对现有评论进行评论时,为评论ID,必须 5 $.ajax({ 6 url: '/mvc/PostComment/New.aspx', 7 data: JSON.stringify(comment), 8 ...
阅读全文
摘要:1 #region 检测是否是正确的身份证 2 /// <summary> 3 /// 身份证验证 4 /// </summary> 5 /// <param name="num"></param> 6 /// <returns></returns> 7 public static bool isI
阅读全文
摘要:function a(){document.write("屏幕分辨率为:"+screen.width+"*"+screen.height+"<br />"+"屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight+"<br />"+"网页可见区域宽:"+document.body.clientWidth+"<br />"+"网页可见区域高:&quo
阅读全文
摘要:平时做项目总是会用到幻灯片功能,网上已经有了很多插件,但是都要配置js引用,css样式,html代码,很是麻烦,不好用,或许是自己太懒了,就希望有一款可以尽量少配置代码的slide插件,于是萌发了自己写的念头。 代码提交到了我的GitHub里。 下载地址:https://github.com/mah
阅读全文

浙公网安备 33010602011771号