jquery 自定义插件
来源:互联网 发布:js array splice 添加 编辑:程序博客网 时间:2024/06/04 01:06
;(function( $ ){$.baiduDemo={random : function () {var tmp=Math.random()*10000;return tmp;},getCtx : function () {var obj=$("meta[name='company']");var content=obj.attr("content");if(!content || content==undefined || content=="" ){console.error("getCtx() company is null. company="+company);}return content;},toRedirectURL : function () {var ss=this.random();var url=$.baiduDemo.getCtx() +"/link/toRedirect.htm?pp="+ss;return url;},toMobileUI : function () {var ss=this.random();var url=$.baiduDemo.getCtx() +"/user/uMobileUI.htm";return url;},indexURL : function () {var ss=this.random();var url=$.baiduDemo.getCtx() +"/index.htm?pp="+ss;return url;},indexeErrorURL : function () {var errormsg="#stopback";var url=$.baiduDemo.indexURL()+errormsg;return url;},webStopBackOnThisUI : function () {var indexurl=document.location.href;var _indexurl_1="";var _indexurl_2="";var errormsg="#errormsg";var num=indexurl.indexOf(errormsg);if(num==-1){_indexurl_1=indexurl;_indexurl_2=indexurl+errormsg;}else{_indexurl_1=indexurl.substring(0,num);_indexurl_2=_indexurl_1+errormsg;}console.log("_indexurl_1 = "+_indexurl_1);console.log("_indexurl_2 = "+_indexurl_2);history.replaceState({goo:"stopback"},document.title,_indexurl_1); history.pushState({goo:""},document.title,_indexurl_2);window.addEventListener("popstate", function(e){ var state=history.state; var is_stopback=(state && state.goo=="stopback"); console.log("state = "+state+" , is_stopback= "+is_stopback); if(is_stopback){ location.href=_indexurl_1; }});},webStopBack : function () {history.replaceState({goo:"stopback"},document.title,$.baiduDemo.indexURL()); history.pushState({goo:""},document.title,$.baiduDemo.indexeErrorURL());window.addEventListener("popstate", function(e){ var state=history.state;var is_stopback=(state && state.goo=="stopback");console.log("state = "+state+" , is_stopback= "+is_stopback);if(is_stopback){location.href=$.baiduDemo.indexURL();}});},webStopBackIndex : function () {var state=history.state;var is_stopback_1=(state && state.goo=="stopback");console.log("is_stopback_1 = "+is_stopback_1);if(is_stopback_1){history.replaceState({goo:"stopback"},document.title,$.baiduDemo.indexURL());history.pushState({goo:""},document.title,$.baiduDemo.indexeErrorURL());}window.addEventListener("popstate", function(e){var state=history.state;var is_stopback=(state && state.goo=="stopback");console.log("state = "+state+" , is_stopback= "+is_stopback);if(is_stopback){location.href=$.baiduDemo.indexURL();}});}};})( jQuery );
0 0
- [ jQuery ] jquery 自定义插件!
- jquery 自定义插件开发
- 自定义jQuery插件
- jquery自定义插件
- jQuery 自定义插件
- jquery 自定义插件开发
- jquery自定义插件
- jquery 自定义插件小结
- Jquery自定义插件
- jQuery自定义插件
- jQuery自定义插件
- JQuery扩展自定义插件
- jQuery自定义插件
- jQuery 自定义插件
- jQuery--自定义插件
- jQuery自定义插件
- jquery自定义插件
- jQuery自定义插件
- Linux运维工程师入门须掌握的10个技术点
- Mybatis.xml配置
- android mark log
- sqlserver 事务try-catch
- JavaScript DOM 属性
- jquery 自定义插件
- Android 直接显示yuv数据 通过Awesomeplayer方式直接显示(三)
- java System.arraycopy
- Integer to English Words
- Android Studio使用git的方法
- Android开发人员不得不收集的代码
- yield 的用法
- android群英传笔记——音频条形图(仿音频动画,无监听音频输入)
- jquery_validate 自定义样式,自定义校验方式