会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
oceanden
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
2014年9月6日
浏览器监测简易版
摘要: //浏览器监测(function(){ window.sys = {}; //外部访问浏览器信息对象; var ua = navigator.userAgent.toLowerCase(); /...
阅读全文
posted @ 2014-09-06 15:40 oceanden
阅读(188)
评论(0)
推荐(0)
2014年8月29日
ajax 纯javascript
摘要: function createXHR(){ if(typeof XMLHttpRequest != 'undefined'){ return new XMLHttpRequest(); }else if(typeof ActiveXObject != 'undefined'...
阅读全文
posted @ 2014-08-29 00:18 oceanden
阅读(274)
评论(0)
推荐(0)
2014年8月26日
js基本操作小类库
摘要: function addEvent(obj,type,fn){ if(obj.addEventListener){ obj.addEventListener(type,fn,false); }else if(obj.attachEvent){ obj.atta...
阅读全文
posted @ 2014-08-26 17:41 oceanden
阅读(294)
评论(0)
推荐(0)
表单自动tab小函数
摘要: addEvent(fm.elements['a1'], 'keyup', tabForWard); addEvent(fm.elements['a2'], 'keyup', tabForWard); addEvent(fm.elements['a3'], 'keyup', tab...
阅读全文
posted @ 2014-08-26 17:40 oceanden
阅读(165)
评论(0)
推荐(0)
cookie写入存储与读取键值对函数
摘要: function setCookie(name, value, expires, path, domain, secure){ var cookieName = encodeURIComponent(name) + '=' + encodeURIComponent(value); if(...
阅读全文
posted @ 2014-08-26 17:38 oceanden
阅读(3725)
评论(0)
推荐(0)
2014年8月21日
浏览器简易嗅探器
摘要: document.write(navigator.userAgent);document.write('');document.write(navigator.platform);var client = function(){//引擎 var engine = { ie:fal...
阅读全文
posted @ 2014-08-21 20:56 oceanden
阅读(538)
评论(0)
推荐(0)
获取键盘charCode函数
摘要: window.onload = function(){ document.onkeypress = function(evt){ alert(String.fromCharCode(getCharCode(evt))); }}function getCharCode(evt...
阅读全文
posted @ 2014-08-21 20:53 oceanden
阅读(389)
评论(0)
推荐(0)
2014年4月20日
简单选项卡(js)
摘要: JS 代码window.onload = function(){ var oDiv = document.getElementById('div1'); var aBtn = oDiv.getElementsByTagName('input'); var aDiv = oDiv.getElem...
阅读全文
posted @ 2014-04-20 21:16 oceanden
阅读(362)
评论(0)
推荐(0)
上一页
1
2
3
4
5
公告