随笔分类 -  javascript

摘要:var topObj = document.createElement('iframe'); topObj.id = 'topFrame'; topObj.frameborder = 0; topTimer = window.setTimeout(function() { alert('topObj.src'); topObj.src = 'http://www.xfck.cn/lantian/htm/top.htm'; }, 100); topObj.allowtransparency = true; topObj.style. 阅读全文
posted @ 2011-02-24 11:36 雨藤 编辑
摘要:for (int i = recivers.Keys.Count; i-- > 0; ) { if (!recivers.Values.ElementAt(i).bExist) { recivers.Remove(recivers.Keys.ElementAt(i)); } }//foreach (UserDictType item in userdict.Values) //{ // if (time > item.LogoutDatetime1) // { // userdict.Remove(item.UserGUID1); // } //}此代码当移除一个数据时可能会引起迭 阅读全文
posted @ 2011-02-24 11:35 雨藤 阅读(293) 评论(0) 推荐(0) 编辑
摘要:script language="javascript" function setFocus() { var obj = event.srcElement; var txt =obj.createTextRange(); txt.moveStart('character',obj.value.length); txt.collapse(true); txt.select(); } /script input type="text" value="abcdefg123456789" onfocus="setFocus()" 阅读全文
posted @ 2011-01-28 10:02 雨藤 阅读(4561) 评论(0) 推荐(0) 编辑
摘要:今天研究了一下www.magictoolbox.com的JS代码,其中有一个(function(){......})():这个结构,让我很郁闷,没有看明白,后来得到一位叫"Shelly->水"的网友的帮助,明白了,原来就是:function test(){......};test();这样的结构,哎!我的悟性有问题了! 阅读全文
posted @ 2010-08-19 17:46 雨藤 阅读(1235) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示