下载

1下载券

加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 ASP.NETasp.net常用的javascript经典例子

ASP.NETasp.net常用的javascript经典例子.doc

ASP.NETasp.net常用的javascript经典例子

飞行者
2018-09-05 0人阅读 举报 0 0 0 暂无简介

简介:本文档为《ASP.NETasp.net常用的javascript经典例子doc》,可适用于IT/计算机领域

aspnet常用的javascript经典例子Dropdownlist无刷新的例子。xml例如文本验证!下面是一个单选按纽前台不刷新的例子有好的就往上贴<scriptlanguage="javascript">functionSetButton(){if(documentallrdoByHumanchecked==true){documentallcboHrPutdisabled=""documentallcboAnswerHrdisabled=""documentallcboGroupdisabled=true}if(documentallrdoByGroupchecked==true){documentallcboHrPutdisabled=truedocumentallcboAnswerHrdisabled=truedocumentallcboGroupdisabled=""}}<script><asp:RadioButtonid="rdoByHuman"onclick="SetButton()"runat="server"GroupName="TotalGroup"Checked="True"Text="按人员"><asp:RadioButton>eItemAttributesAdd("onmouseOver","thisstylebackgroundColor='#deee'")鼠标移上去的颜色eItemAttributesAdd("onmouseOut","thisstylebackgroundColor='white'")eItemCellsAttributesAdd("onmouseOver","thisstylebackgroundColor='red'")eItemCellsAttributesAdd("onmouseOut","thisstylebackgroundColor='white'")指定某列的颜色eItemCellsStyle"cursor"="hand"eItemCellsAttributesAdd("onclick","alert('你惦记的ID是:"eItemCellsText"')")指定显示字段eItemCellsAttributesAdd("title","'红孩是未解决的蓝精灵是已解决的!'"eItemCellsTextToString())显示titleeItemCellsAttributesAdd("onclick","windowopen('xinxiFormaspxidmain="eItemCellsText"','','ToolBar=no,width=,height=')")屏闭一些键:functionKeyDown(){屏蔽鼠标右键、Ctrln、shiftF、F刷新、退格键alert("ASCII代码是:"eventkeyCode)if((windoweventaltKey)((windoweventkeyCode==)||屏蔽Alt方向键←(windoweventkeyCode==))){屏蔽Alt方向键→alert("不准你使用ALT方向键前进或后退网页!")eventreturnValue=false}if((eventkeyCode==)||屏蔽退格删除键(eventkeyCode==)||屏蔽F刷新键(eventkeyCode==)||屏蔽F刷新键(eventctrlKeyeventkeyCode==)){CtrlReventkeyCode=eventreturnValue=false}if((eventctrlKey)(eventkeyCode==))屏蔽CtrlneventreturnValue=falseif((eventshiftKey)(eventkeyCode==))屏蔽shiftFeventreturnValue=falseif(windoweventsrcElementtagName=="A"windoweventshiftKey)windoweventreturnValue=false屏蔽shift加鼠标左键新开一网页if((windoweventaltKey)(windoweventkeyCode==)){屏蔽AltFwindowshowModelessDialog("about:blank","","dialogWidth:pxdialogheight:px")returnfalse}} oncontextmenu="windoweventreturnvalue=false"   将彻底屏蔽鼠标右键 <bodyonselectstart="returnfalse">        取消选取、防止复制 onpaste="returnfalse"               不准粘贴 oncopy="returnfalse"oncut="returnfalse"    防止复制防止剪切 <linkrel="ShortcutIcon"href="faviconico">IE地址栏前换成自己的图标 <linkrel="Bookmark"href="faviconico"> 可以在收藏夹中显示出你的图标 <inputstyle="imemode:disabled">             关闭输入法 永远都会带着框架<scriptlanguage="javascript"><! if(window==top)toplocationhref="frameshtm"file:frameshtm为框架网页><script> 防止被人frame<SCRIPTLANGUAGE=javascript><! if(toplocation!=selflocation)toplocation=selflocation><SCRIPT><noscript><iframesrc=*html><iframe><noscript>  网页将不能被另存为使用鼠标拖动的层<BODYBGCOLOR="#FFFFFF"><divonmousedown="stylecursor='move'startMove(this)"onmouseup="stylecursor='auto'"style="border:pxsolid#AAAAAAbackgroundcolor:#EEEEEEwidth:height:positiontextalign:center">可以使用鼠标拖动<div><scriptlanguage=javascript>functionstartMove(objDiv){documentattachEvent("onmousemove",moveDiv)documentattachEvent("onmouseup",endMove)documentattachEvent("onselectstart",selectNo)document"moveDiv"=objDivdocument"startX"=eventxdocument"startY"=eventydocument"oldX"=objDivgetBoundingClientRect()leftdocument"oldY"=objDivgetBoundingClientRect()top}functionmoveDiv(){try{varobj=document"moveDiv"if(obj){varl=document"oldX"objgetBoundingClientRect()leftobjstyleleft=(eventxdocument"startX")vart=document"oldY"objgetBoundingClientRect()topobjstyletop=(eventydocument"startY")objstyleposition="absolute"objstyleleft=l(eventxdocument"startX")objstyletop=t(eventydocument"startY")}}catch(e){endMove()}}functionendMove(){documentdetachEvent("onmousemove",moveDiv)documentdetachEvent("onmouseup",endMove)documentdetachEvent("onselectstart",selectNo)document"moveDiv"=document"startX"=document"startY"=}functionselectNo(){returnfalse}<script><BODY>*异步动态的加载网页xml数据*实际运用有更改functionGetXml(objContainer,id){varXmlHttp=newActiveXObject("MicrosoftXMLHTTP")objContainerinnerHTML=StateXML(Configloading)objContainersend="true"XmlHttponreadystatechange=function(){if(XmlHttpreadyState==){if(XmlHttpstatus==){varXmldoc=XmlHttpresponseXMLif(XmldocdocumentElementhasChildNodes())objContainerinnerHTML=XmldoctransformNode(xsldoc)elseobjContainerinnerHTML=StateXML(Configloading)}elseobjContainerinnerHTML=StateXML(Configunavaible)}}XmlHttpopen("get",ConfigService'id='id'tem'Mathrandom(),true)XmlHttpsend()}

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/4

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利