zoukankan      html  css  js  c++  java
  • html代码分享

    贴图:<img src="图片URL">

    加入连接:<a href="所要连接的相关URL">写上你想写的字</a>

    在新窗口打开连接:<a href="相关URL" target="_blank">写上要写的字</a>

    消除连接的下划线在新窗口打开连接:<a href="相关URL" style="text-decoration:none" target="_blank">写上你想写的字</a>

    移动字体 (走马灯):<marquee>写上你想写的字</marquee>

    字体加粗:<b>写上你想写的字</b>

    字体斜体:<i>写上你想写的字</i>

    字体下划线: <u>写上你想写的字</u>

    字体删除线:<s>写上你想写的字</s>

    字体加大:<big>写上你想写的字</big> #wiki.geekfans.com

    字体控制大小:<h1>写上你想写的字</h1> (其中字体大小可从h1-h5,h1最大,h5最小)

    更改字体颜色:<font color="#value">写上你想写的字</font>(其中value值在000000与ffffff(16位进制)之间

    消除连接的下划线:<a href="相关URL" style="text-decoration:none">写上你想写的字</a>

    贴音乐:<embed src=音乐URL width=300 height=45 type=audio/mpeg autostart="false">

    贴 flash:<embed src="flashURL" width="宽度" height="高度">

    贴影视文件:<img dynsrc="文件URL" width="宽度" height="高度" start=mouseover>

    换行:<br>

    防偷代码:滑小稽

    段落:<p>段落</p>

    原始文字样式:<pre>正文</pre>

    换帖子背景:<body background="背景图片URL">

    固定帖子背景不随滚动条滚动:<body background="背景图片URL" body bgproperties=fixed>

    定制帖子背景颜色:<body bgcolor="#value">(value值见10)

    帖子背景音乐:<bgsound="背景音乐URL" loop=infinite>

    返回上一页:<a href=javascript :history.back(1)>『返回上一页』</a>

    关闭窗口:<a href=javascript :self.close()>『关闭窗口』</a>

    关于 iframe 的透明背景:

    <IFRAME ID="iFrame1" SRC="iframe.htm"allowTransparency="true"style="background-color: green"></IFRAME>

    oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键<table border oncontextmenu=return(false)><td>no</table> 可用于Table

    <body onselectstart="return false"> 取消选取、防止复制

    onpaste="return false" 不准粘贴

    oncopy="return false;" oncut="return false;" 防止复制

    <link rel="Shortcut Icon" href="favicon.ico"> IEURL栏前换成自己的图标

    <link rel="Bookmark" href="favicon.ico"> 可以在收藏夹中显示出你的图标

    <input style="ime-mode:disabled"> 关闭输入法

    网页将不能被另存为:<noscript><iframe src=*.html></iframe></noscript>

    查看网页源代码:<input type=button value=查看网页源代码 onclick="window.location = "view-source:"+ "http://www.pconline.com.cn"">

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

    不要滚动条?

    让竖条没有:<body style="overflow:scroll;overflow-y:hidden"></body>

    让横条没有:<body style="overflow:scroll;overflow-x:hidden"></body>

    两个都去掉?更简单了:<body scroll="no"></body>

    怎样去掉图片链接点击后,图片周围的虚线?:<a href="#" onFocus="this.blur()"><img src="logo.jpg" border=0></a>

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

    如何设定打开页面的大小:<body onload="top.resizeTo(300,200);">打开页面的位置<body onload="top.moveBy(300,200);">

    获得一个窗口的大小:document.body.clientWidth; document.body.clientHeight

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

    ENTER 键可以让光标移到下一个输入框:<input onkeydown="if(event.keyCode==13)event.keyCode=9">

    空格代码;<span style="font-size:12px;">&nbsp;&nbsp;&nbsp;</span>

    这个只要在编写的时候加上换行代码就可以了,换行代码有两种

    第一种是<p>这里是第二行的文字</p>

    第二种是<br>后面是第二行的文字。

  • 相关阅读:
    6-Python爬虫-分布式爬虫/Redis
    ES 查询时 排序报错(fielddata is disabled on text fileds by default ... )解决方法
    Intellij Idea webstorm 激活
    Intellij Idea 配置jdk
    java 获取(格式化)日期格式
    js 跳转 XSS漏洞 预防
    CSS去掉背景颜色
    js对象无法当成参数传递 解决方法
    Elasticsearch java api
    java多条件查询SQL语句拼接的小技巧
  • 原文地址:https://www.cnblogs.com/HGNET/p/11447971.html
Copyright © 2011-2022 走看看