代码改变世界

12 2010 档案

摘要:响应KeyPress事件publiccharFullCodeToHalfCode(charc){//得到c的编码byte[]bytes=System.Text.Encoding.Unicode.GetBytes(c.ToString());intH=Convert.ToInt32(bytes[1]);intL=Convert.ToInt32(bytes[0]);//得到unicode编码intvalue=H*256+L;//是全角if(value=65281&&value=65374){inthalfvalue=value-65248;//65248是全半角间的差值。bytehalfL=C 阅读全文
posted @ 2010-12-22 15:45 robinli 阅读(222) 评论(0) 推荐(0) 编辑
摘要:广告JS代码效果大全2.[鼠标感应] 与前面一个代码不同的是,当鼠标移动到广告图片上是可以感应显示另外设置好的广告大图效果,下面就是实现效果所需代码:function bigshow(){ document.all.div_250.style.visibility = 'visible'; document.all.div_80.style.visibility = 'hidden'; } function bighide(){ document.all.div_80.style.visibility = 'visible'; document.all.div_250.style 阅读全文
posted @ 2010-12-22 15:44 robinli 阅读(118) 评论(0) 推荐(0) 编辑
摘要:广告JS代码效果大全4.[浮动对联广告---之左侧代码] 如果您想只有一侧显示的话,下面是实现左侧效果所需代码:var ad_float_left_src ="图片地址"; var ad_float_left_url ="地址"; var ad_float_left_type = ""; document.ns = navigator.appName == "Microsoft Internet Explorer" var imgheight_close var imgleft window.screen.width800 ? imgheight_close=120:imgheig 阅读全文
posted @ 2010-12-22 15:44 robinli 阅读(174) 评论(0) 推荐(0) 编辑
摘要:广告JS代码效果大全1.[普通效果] 现在很多网站广告做的如火如荼,现在我就来介绍一下常见的对联浮动广告效果的代码使用方法,介绍的这种效果,在1024*768分辨率下正常显示,在800*600的分辨率下可以自动隐藏,以免遮住页面影响访问者浏览内容,下面就是实现效果所需代码:var delta=0.015var collection; function floaters() { this.items = []; this.addItem =function(id,x,y,content) { document.write('DIV id='+id+' style="Z-INDEX: 阅读全文
posted @ 2010-12-22 15:43 robinli 阅读(123) 评论(0) 推荐(0) 编辑
摘要:JS代码判断集锦(之一) script language="JavaScript"function checkid(iden,year,month,day){if (iden.value.length==15) {if ((iden.value.lastIndexOf(month.value+day.value))==8) {return true;}return false;}if (iden.value.length==18) {if ((iden.value.indexOf(year.value+month.value+day.value))==6) {return true;}re 阅读全文
posted @ 2010-12-22 15:42 robinli 阅读(149) 评论(0) 推荐(0) 编辑
摘要:JS代码判断集锦(之二)INPUT TYPE="button" value="登录"tabindex="4"INPUT TYPE="button" value="注册"tabindex="4"function trim(inputstr) //去处空格,在获取客户端录入的表单信息前,都先trim一下再提交 例如:“form1.org_name.value = trim(form1.org_name.value);”{if(!inputstr.length0) return "";var starts=0;var ends=inputstr.length;while(startsen 阅读全文
posted @ 2010-12-22 15:42 robinli 阅读(122) 评论(0) 推荐(0) 编辑
摘要:弹窗代码汇总【0、超完美弹窗代码 】功能:5小时弹一次+背后弹出+自动适应不同分辩率+准全屏显示代码:scriptfunction openwin(){window.open(http://www.6882.com,"pop1","width="+(window.screen.width-15)+",height="+(window.screen.height-170)+",left=0,top=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes")setTimeout("focus( 阅读全文
posted @ 2010-12-22 15:41 robinli 阅读(155) 评论(0) 推荐(0) 编辑
摘要://操作EXECLscript language="javascript"function jStartExcel() {var xls = new ActiveXObject ( "Excel.Application" );xls.visible = true;var newBook = xls.Workbooks.Add;newBook.Worksheets.Add;newBook.Worksheets(1).Activate;xls.ActiveWorkBook.ActiveSheet.PageSetup.Orientation = 2;xls.ActiveWorkBook.Acti 阅读全文
posted @ 2010-12-22 15:40 robinli 阅读(176) 评论(0) 推荐(0) 编辑
摘要:JavaScript[对象.属性]集锦SCRIPT 标记用于包含javascript代码.语法属性LANGUAGE 定义脚本语言SRC 定义一个URL用以指定以.JS结尾的文件windows对象每个HTML文档的顶层对象.属性frames[] 子桢数组.每个子桢数组按源文档中定义的顺序存放.feames.length 子桢个数.self 当前窗口.parent 父窗口(当前窗口是中一个子窗口).top 顶层窗口(是所有可见窗口的父窗口).status 浏览器状态窗口上的消息.defaultStatus 当status无效时,出现在浏览器状态窗口上的缺省消息.name 内部名,为由window. 阅读全文
posted @ 2010-12-22 15:40 robinli 阅读(152) 评论(0) 推荐(0) 编辑
摘要:高级应用(二)//组件是否安装isComponentInstalled("{6B053A4B-A7EC-4D3D-4567-B8FF8A1A5739}", "componentID"))//检查网页是否存在function CheckURL(URL){var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");xmlhttp.Open("GET",URL, false);try{ xmlhttp.Send(); var result = xmlhttp.status;}catch(e) {return(false); }if(result==2 阅读全文
posted @ 2010-12-22 15:39 robinli 阅读(163) 评论(0) 推荐(0) 编辑
摘要://打印分页 pstyle="page-break-after:always"page1/p pstyle="page-break-after:always"page2/p //设置打印object id="factory" style="display:none" viewastextclassid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"/objectinput type= 阅读全文
posted @ 2010-12-22 15:38 robinli 阅读(142) 评论(0) 推荐(0) 编辑
摘要://移动的图层,拖动1.span style='position:absolute;width:200;height:200;background:red' onmousedown=MouseDown(this) onmousemove=MouseMove() onmouseup=MouseUp()meizz/spanscript language=javascriptvar Obj;function MouseDown(obj){Obj=obj;Obj.setCapture();Obj.l=event.x-Obj.style.pixelLeft;Obj.t=event.y-Obj 阅读全文
posted @ 2010-12-22 15:38 robinli 阅读(110) 评论(0) 推荐(0) 编辑
摘要:高级应用(一)//各种尺寸s+="\r\n网页可见区域宽:"+document.body.clientWidth; s+="\r\n网页可见区域高:"+document.body.clientHeight; s+="\r\n网页可见区域高:"+document.body.offsetWeight+"(包括边线的宽)"; s+="\r\n网页可见区域高:"+document.body.offsetHeight+"(包括边线的宽)"; s+="\r\n网页正文全文宽:"+document.body.scrollWidth; s+="\r\n网页正文全文高:"+document.body.scrol 阅读全文
posted @ 2010-12-22 15:37 robinli 阅读(124) 评论(0) 推荐(0) 编辑
摘要:事件源对象event.srcElement.tagNameevent.srcElement.type捕获释放event.srcElement.setCapture();event.srcElement.releaseCapture();事件按键event.keyCodeevent.shiftKeyevent.altKeyevent.ctrlKey事件返回值event.returnValue鼠标位置event.xevent.y窗体活动元素document.activeElement绑定事件document.captureEvents(Event.KEYDOWN);访问窗体元素document.a 阅读全文
posted @ 2010-12-22 15:36 robinli 阅读(125) 评论(0) 推荐(0) 编辑

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