
前端之路
前端学习记录
embaobao
c# ASP.NET、mvc,api,web page WIN FORM java java web JQ, JS.H5 ,CSS, VUE Android
展开
-
hbuider配置初始
{ "forEach": { "prefix": "fec", "body": [ ".forEach(function(item, index){console.log( index +'$1:'+ item);})" ], "triggerAssist": true, "description": " 迭代数组对象 funct原创 2018-12-09 00:15:13 · 995 阅读 · 0 评论 -
基础模块 网络连接检查 js
//无对象则加载if (typeof Base == "undefined") Base = function() {}// 获取时间对象的基本方法Base.prototype.getTime = function() { var date = new Date(); var yyyy = date.getFullYear(); //四位年份 var month = date.ge...原创 2018-12-02 00:43:33 · 193 阅读 · 0 评论 -
页面系统,浏览器检测- 网页基础模块(JavaScript)
// 浏览器检测,获取,弹出框提醒IE 返回浏览器详情function GetbrowserSys(){ var BrowserMatch = { init: function() { this.browser = this.getBrowser().browser || "An Unknown Browser"; this.versio...转载 2018-12-01 23:33:32 · 344 阅读 · 0 评论 -
页面检测网络外网连接- 网页基础模块(JavaScript)
方法一 html 添加图片标签加载外站图片 <img id="connect-test" style="display:none;" onload="conectSuccess()" onerror="conectError()" />加载成功执行 connectsuccess()函数;// 浏览器动态数据检测 联机执行函数 function cone...原创 2018-12-01 22:53:23 · 458 阅读 · 0 评论 -
js动态检测加载 JQ
var jqcdnurl = 'https://cdn.bootcss.com/jquery/3.2.1/jquery.js';//控制台输出function log() { for (var index in arguments) { console.log(arguments[index]); }}//js加载 funfunction loadjs()...原创 2018-07-04 23:28:46 · 724 阅读 · 0 评论 -
js 动态添加 外部js css 到head标签
function appendJQCDN() { var head = document.head || document.getElementsByTagName('head')[0]; var script = document.createElement('script'); var style = document.createElement('style'...转载 2018-07-04 21:34:56 · 4857 阅读 · 0 评论 -
js异常处理
<script>function myFunction(){try{ var x=document.getElementById("demo").value;if(x=="") throw "值为空";if(isNaN(x)) throw "不是数字";if(x>10) throw "太大";if(x<5) th转载 2018-07-04 20:00:58 · 542 阅读 · 0 评论 -
js 回调
//定义主函数,回调函数作为参数function A(callback) { callback(); console.log('我是主函数'); }//定义回调函数function B(){ setTimeout("console.log('我是回调函数')", 3000);//模仿耗时操作 }//调用主函数,将函数B传进去A(B);/...转载 2018-07-04 19:58:14 · 299 阅读 · 0 评论 -
js函数动态传参
js函数体内可以通过arguments对象来接收传递进来的参数,利用这一对象属性可以动态传参。function box() { return arguments[0]+' | '+arguments[1]; //得到每次参数的值}alert(box(1,2,3,4,5,6)); //传递参数 arguments对象的lengt...转载 2018-07-04 19:30:32 · 2744 阅读 · 0 评论 -
js 异步加载
document 加载 document.write("<scr" + "ipt src=\"js/jquery.js\"></sc" + "ript>")转载 2018-07-04 19:29:04 · 139 阅读 · 0 评论 -
js 遍历
for循环var a = new Array("first", "second", "third") for(var i = 0;i < a.length; i++) {document.write(a[i]+",");}for invar arr = new Array("first", "second", "third") for(var item in arr)...翻译 2018-07-04 19:28:10 · 184 阅读 · 0 评论 -
sublim 配置 用户默认绑定的格式化文本快捷键
//在绑定用户绑定配置中 加入 激活每个字母提示! "auto_complete": true,"auto_match_enabled": true,"auto_complete_triggers": [ {"selector": "text.html", "characters": "1234567890abcdefghijklmnopqrstuvwxy原创 2018-12-02 00:47:35 · 191 阅读 · 0 评论 -
JQ 实现监测input中值的变化并绑定到另个input
$(function () { $('#input').bind('input propertychange', function () { $('#output').html($(this).val().length + ' characters'); }); ...翻译 2018-06-28 11:16:25 · 2477 阅读 · 0 评论