当前位置:首页 > TAG信息列表 > 光遇风行季先祖

光遇风行季先祖

光遇风行季先祖都有谁

1回顶部

  太low了,网页居然还用这么老掉牙的特效!弄个粗体字,下划线就是突出重点了?真是一股浓浓的乡村风扑面而来;弄个图在页面飘来飘去就是动画效果了,你要这么认为的话那我只能保持沉默了。在html5占领着整个互联网之时,想透过网页抓住所有人的眼球,因循守旧是行不通的。因此,有你不能不知道的html常用代码。只有熟悉掌握了常用的html代码,你才能在编写网页的时候做到行云流水,用处处流露着细腻和创意的动效细节打动所有人。

  html代码大全:结构性定义

  文件类型redoverflow:scroll;overflow-y:hidden>  </body>

你不能不知道的HTML常用代码

  怎样才能把realplayer文件在网页做一个试听连接?  <embedheight=25 src=51js.rmtype=audio/x-pn-realaudio-pluginwidth=50autostart="false"c>

  如何用html实现浏览器上后退按钮的功能?  <ahref="javascript.:history.go(-1)">点击后退</a>  或者  <script>history.back()</script>

4回顶部

  html代码大全:你不一定知道的技巧

  16.ncontextmenu="window.event.returnvalue=false"将彻底屏蔽鼠标右键  <tableborderncontextmenu=return(false)><td>no</table>可用于table  17.<bodynselectstart="returnfalse">取消选取、防止复制  18.onpaste="returnfalse"不准粘贴  19.oncopy="returnfalse;"ncut="returnfalse;"防止复制

  20.<linkrel="shortcuticon"href="favicon.ico">ie地址栏前换成自己的图标

  21.<linkrel="bookmark"href="favicon.ico">可以在收藏夹中显示出你的图标

  22.<inputstyle="ime-mode:disabled">关闭输入法

  23.永远都会带着框架  <script.language="javascript"><!--  if(window==top)top.location.href="frames.htm";//frames.htm为框架网页  //--></script>

  24.防止被人frame.

  <script.language=javascript><!--  if(top.location!=self.location)top.location=self.location;  //--></script>

  25.网页将不能被另存为

  <noscript><iframe.src=*.html></iframe></noscript>

  26.查看网页源代码

  <inputtype=buttonvalue=查看网页源代码  onclick="window.location="view-source:"+"//"">

  27.删除时确认

  <ahref="javascript:if(confirm("确实要删除吗?"))location="boos.asp?&areyou=删除&page=1"">删除</a>

  28.屏蔽功能键shift,alt,ctrl  <script>  functionlook(){  if(event.shiftkey)  alert("禁止按shift键!");//可以换成alt ctrl  }  document.onkeydown=look;  </script>

  29.网页不会被缓存  <meta.http-equiv="pragma"content="no-cache">  <meta.http-equiv="cache-control"content="no-cache,must-revalidate">  <meta.http-equiv="expires"content="wed,26feb199708:21:57gmt">  或者<meta.http-equiv="expires"content="0">

  30.怎样让表单没有凹凸感?  <inputtype=textstyle="border:1solid#000000">  或<inputtype=textstyle="border-left:none;border-right:none;border-top:none;border-bottom:1solid#000000"></textarea>

  31.不要滚动条?  让竖条没有:  <bodystyle="overflow:scroll;overflow-y:hidden">  </body>  让横条没有:  <bodystyle="overflow:scroll;overflow-x:hidden">  </body>  两个都去掉?更简单了  <bodyscroll="no">  </body>

  32.怎样去掉图片链接点击后,图片周围的虚线?

  <ahref="#"nfocus="this.blur()"><imgsrc="logo.jpg"border=0></a>

  33.电子邮件处理提交表单

  <form.name="form1"method="post"action="mailt****@***.com"enctype="text/plain">  <inputtype=submit>  </form>

  34.在打开的子窗口刷新父窗口的代码里如何写?  window.opener.location.reload()

  35.如何设定打开页面的大小  <bodynload="top.resizeto(300,200);">  打开页面的位置<bodynload="top.moveby(300,200);">

  36.在页面中如何加入不是满铺的背景图片,拉动页面时背景图不动  <style>  body  {background-image:url(logo.gif);background-repeat:no-repeat;  background-position:center;background-attachment:fixed}  </style>

  37.检查一段字符串是否全由数字组成  <script.language="javascript"><!--  functionchecknum(str){returnstr.match(//d/)==null}  alert(checknum("1232142141"))  alert(checknum("123214214a1"))  //--></script>

  38.获得一个窗口的大小  document.body.clientwidth;document.body.clientheight

  39.怎么判断是否是字符  if(/[^/x00-/xff]/g.test(s))alert("含有汉字");  elsealert("全是字符");

  40.textarea自适应文字行数的多少  <textarearows=1name=s1cols=27npropertychange="this.style.posheight=this.scrollheight">  </textarea>

  41.日期减去天数等于第二个日期  <script.language=javascript>  functioncc(dd,dadd)  {  //可以加上错误处理  vara=newdate(dd)  a=a.valueof()  a=a-dadd*24*60*60*1000  a=newdate(a)  alert(a.getfullyear()+"年"+(a.getmonth()+1)+"月"+a.getdate()+"日")  }cc("12/23/2002",2)  </script>

  42.选择了哪一个radio  <html><script.language="vbscript">  functioncheckme()  foreachobinradio1  ifob.checkedthenwindow.alertob.value  next  endfunction  </script><body>  <inputname="radio1"type="radio"value="style"checked>style.  <inputname="radio1"type="radio"value="barcode">barcode  <inputtype="button"value="check"nclick="checkme()">  </body></html>

  43.脚本永不出错  <script.language="javascript">  <!--hidefunctionkillerrors(){returntrue;}window.onerror=killerrors;//-->  </script>

  44.enter键可以让光标移到下一个输入框  <inputnkeydown="if(event.keycode==13)event.keycode=9">


读书郎评测网 欣宸优选

  • 关注微信关注微信

猜你喜欢

微信公众号