当前位置:首页 > 代码 > 正文

html扫雷代码(html扫雷源码)

admin 发布:2022-12-19 23:32 194


今天给各位分享html扫雷代码的知识,其中也会对html扫雷源码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

求html代码大全

文件类型HTML/HTML (放在档案的开头与结尾)

文件主题TITLE/TITLE (必须放在「文头」区块内)

文头HEAD/HEAD (描述性资料,像是「主题」)

文体BODY/BODY (文件本体)

标题H?/H? (从1到6,有六层选择)

标题的对齐 H?ALIGN=LEFT|CENTER|RIGHT/H?

区分DIV/DIV

区分的对齐 DIVALIGN=LEFT|RIGHT|CENTER|JUSTIFY/DIV

引文区块BLOCKQUOTE/BLOCKQUOTE (通常会内缩)

强调EM/EM (通常会以斜体显示)

特别强调STRONG/STRONG (通常会以加粗显示)

引文CITE/CITE (通常会以斜体显示)

码CODE/CODE (显示原始码之用)

样本SAMP/SAMP

键盘输入KBD/KBD

变数VAR/VAR

定义DFN/DFN (有些浏览器不提供)

地址 ADDRESS/ADDRESS

大字BIG/BIG

小字SMALL/SMALL

与外观相关的标签(作者自订的表现方式)

加粗B/B

斜体I/I

底线U/U (尚有些浏览器不提供)

删除线S/S (尚有些浏览器不提供)

下标SUB/SUB

上标SUP/SUP

打字机体TT/TT (用单空格字型显示)

预定格式PRE/PRE (保留文件中空格的大小)

预定格式的宽度PRE WIDTH=?/PRE(以字元计算)

向中看齐CENTER/CENTER (文字与图片都可以)

闪耀BLINK/BLINK (有史以来最被嘲弄的标签)

字体大小 FONTSIZE=?/FONT(从1到7)

改变字体大小 FONTSIZE=+|-?/FONT

基本字体大小 BASEFONTSIZE=? (从1到7; 内定为3)

字体颜色 FONTCOLOR="#$$"/FONT($$为颜色代码)

html代码大全:修改页面的实用性HTML代码

1)贴图:img src="图片地址"

2)加入连接:a href="所要连接的相关地址"写上你想写的字/a

3)在新窗口打开连接:a href="相关地址" target="_blank"写上要写的字/a

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

5)字体加粗:b写上你想写的字/b

6)字体斜体:i写上你想写的字/i

7)字体下划线: u写上你想写的字/u

8)字体删除线: s写上你想写的字/s

9)字体加大: big写上你想写的字/big

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

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

12)消除连接的下划线:a href="相关地址" style="text-decoration:none"写上你想写的字/a

13)贴音乐:embed src="音乐地址" width="宽度" height="高度" autostart=false

14)贴flash: embed src="flash地址" width="宽度" height="高度"

15)贴影视文件:img dynsrc="文件地址" width="宽度" height="高度" start=mouseover

16)换行:br

17)段落:p段落/p

18)原始文字样式:pre正文/pre

19)换帖子背景:body background="背景图片地址"

20)固定帖子背景不随滚动条滚动:body background="背景图片地址" body

bgproperties=fixed

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

22)帖子背景音乐:bgsound="背景音乐地址" loop=infinite

23)贴网页:iframe. src="相关地址" width="宽度" height="高度"/iframe

html代码大全:常常会遇到的问题

点击关闭窗口

a href="javascript.:top.window.close();"点击关闭窗口/a!

请问如何去掉主页右面的滚动条?

body scroll="no"

body style="overflow-y:hidden"

如何做到让一个网页自动关闭.

html

head

OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"

param name="Command" value="Close"

/object

/head

body

这个窗口会在10秒过后自动关闭,而且不会出现提示. /body

如何在不刷新页面的情况下刷新css?

style

button{ color:#000000;}

/style

button nclick=document.styleSheets[0].rules[0].style.color=‘‘‘‘red‘‘‘‘点击按钮直接修改style标签里button选择符使按钮改为红色/button

请问如何让网页自动刷新?

在head部记入META. HTTP-EQUIV="Refresh" c其中20为20秒后自动刷新,你可以更改为任意值。

如何让页面自动刷新?

方法一,用refresh

HTML 代码片段如下:

head

meta. http-equiv="refresh" c

/head

5表示刷新时间

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

方法二,使用setTimeout控制

img src=/logo.gif

script

function rl(){

document.location.reload()

}

setTimeout(rl,2000)

/SCRIPT

如何让超链接没有下划线

在源代码中的HEAD…/HEAD之间输入如下代码:

style. type="text/css" !--

a { text-decoration: none}

-- /style

请问如何去掉IE的上下滚动条?

body style=‘‘‘‘overflow:scroll;overflow-y:hidden‘‘‘‘

/body

怎样才能把RealPlayer文件在网页做一个试听连接?

embed height=25 src=51js.rm type=audio/x-pn-realaudio-plugin width=50 autostart="false" c

如何用html实现浏览器上后退按钮的功能?

a href="java script.:history.go(-1)"点击后退/a

或者

script history.back() /SCRIPT

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

16. ncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键

table borderncontextmenu=return(false)tdno/table 可用于Table

17. body nselectstart="return false" 取消选取、防止复制

18.onpaste="return false" 不准粘贴

19.oncopy="return false;" ncut="return false;" 防止复制

20. link rel="Shortcut Icon"href="favicon.ico" IE地址栏前换成自己的图标

21. link rel="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. 网页将不能被另存为

noscriptiframe.src=*.html/iframe/noscript

26. 查看网页源代码

input type=button value=查看网页源代码

onclick="window.location = "view-source:"+"""

27.删除时确认

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

28.屏蔽功能键Shift,Alt,Ctrl

script

function look(){

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, 26 Feb 1997 08:21:57 GMT"

或者META. HTTP-EQUIV="expires"CONTENT="0"

30.怎样让表单没有凹凸感?

input type=text style="border:1 solid #000000"

或 input type=text style="border-left:none;border-right:none; border -top:none; border-bottom: 1 solid#000000"/textarea

31.不要滚动条?

让竖条没有:

body style="overflow:scroll;overflow-y:hidden"

/body

让横条没有:

body style="overflow:scroll;overflow-x:hidden"

/body

两个都去掉?更简单了

body scroll="no"

/body

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

a href="#"nFocus="this.blur()"img src="logo.jpg"border=0/a

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

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

input type=submit

/form

34.在打开的子窗口刷新父窗口的代码里如何写?

window.opener.location.reload()

35.如何设定打开页面的大小

body nload="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"!--

function checkNum(str){return str.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("含有汉字");

else alert("全是字符");

40.TEXTAREA自适应文字行数的多少

textarea rows=1 name=s1 cols=27npropertychange="this.style.posHeight=this.scrollHeight"

/textarea

41. 日期减去天数等于第二个日期

script. language=Javascript

function cc(dd,dadd)

{

//可以加上错误处理

var a = new Date(dd)

a = a.valueOf()

a = a - dadd * 24 * 60 * 60 * 1000

a = new Date(a)

alert(a.getFullYear() + "年" + (a.getMonth() +1) + "月" + a.getDate() + "日")

} cc("12/23/2002",2)

/script

42. 选择了哪一个Radio

HTMLscript. language="vbscript"

function checkme()

for each ob in radio1

if ob.checked then window.alert ob.value

next

end function

/scriptBODY

INPUT name="radio1" type="radio"value="style" checkedStyle.

INPUT name="radio1" type="radio"value="barcode"Barcode

INPUT type="button" value="check"nclick="checkme()"

/BODY/HTML

43.脚本永不出错

SCRIPT. LANGUAGE="JavaScript"

!-- Hide function killErrors(){return true;} window.onerror = killErrors;// --

/SCRIPT

44.ENTER键可以让光标移到下一个输入框

input nkeydown="if(event.keyCode==13)event.keyCode=9"

HTML 整人代码

script language="javascript"

function hr(){

alert('你关不掉的^_^')

hr();

}

/script

body onLoad="hr()"

/body

做坏事了 面壁去。。

用JS写扫雷游戏怎样写

Newing扫雷 对战扫雷 六角扫雷 扫雷 扫雷游戏 奇趣扫雷 玩扫雷 娱乐扫雷 扫雷惊魂 经典扫雷 扫雷者 卡通版扫雷 右击 查看源代码

网页设计常用HTML代码

网页设计常用HTML代码大全

HTML是用来描述网页的一种语言。下面我为大家分享HTML代码,希望对大家学习html代码有帮助!

忽视右键

body oncontextmenu="return false"

body style="overflow-y:hidden"

1.如何几秒后转到别的页面?

META HTTP-EQUIV="Refresh" CONTENT="时间;URL=地址"

2.点击关闭窗口

a href="javascript:top.window.close();"点击关闭窗口/a!

3.请问如何去掉主页右面的滚动条?

body scroll="no"

body style="overflow-y:hidden"

4.请问如何做到让一个网页自动关闭.

html

head

OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"

param name="Command" value="Close"

/object

/head

body onload="window.setTimeout(‘‘‘‘closes.Click()‘‘‘‘,10000)"

这个窗口会在10秒过后自动关闭,而且不会出现提示. /body

如何在不刷新页面的情况下刷新css?

style

button{ color:#000000;}

/style

button onclick=document.styleSheets[0].rules[0].style.color=‘‘‘‘red‘‘‘‘点击按钮直接修改style标签里button选择符使按钮改为红色/button

请问如何让网页自动刷新?

在head部记入META HTTP-EQUIV="Refresh" content="20"其中20为20秒后自动刷新,你可以更改为任意值。

5.如何让页面自动刷新?

方法一,用refresh

HTML 代码片段如下:

head

meta http-equiv="refresh" content="5"

/head

5表示刷新时间

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

方法二,使用setTimeout控制

img src=/logo.gif

script

function rl(){

document.location.reload()

}

setTimeout(rl,2000)

/script

6.如何让超链接没有下划线

在源代码中的HEAD…/HEAD之间输入如下代码:

style type="text/css" !--

a { text-decoration: none}

-- /style

7.请问如何去掉IE的上下滚动条?

body style=‘‘‘‘overflow:scroll;overflow-y:hidden‘‘‘‘

/body

8.怎样才能把RealPlayer文件在网页做一个试听连接?

embed height=25 src=51js.rm type=audio/x-pn-realaudio-plugin width=50 autostart="false" controls="PlayButton"

9.如何用html实现浏览器上后退按钮的功能?

a href="java script:history.go(-1)"点击后退/a

或者

script history.back() /script

10.请问怎么在网页中改变鼠标的箭头形状?

HTML 代码片段如下:

body

a href="#" style="cursor: auto;"auto/abr

a href="#" style="cursor: crosshair "crosshair /abr

a href="#" style="cursor: default "default /abr

a href="#" style="cursor: hand "hand /abr

a href="#" style="cursor: move "move /abr

a href="#" style="cursor: e-resize "e-resize /abr

a href="#" style="cursor: ne-resize "ne-resize /abr

a href="#" style="cursor: nw-resize"nw-resize/abr

a href="#" style="cursor: n-resize"n-resize/abr

a href="#" style="cursor: se-resize"se-resize/abr

a href="#" style="cursor: sw-resize"sw-resize/abr

a href="#" style="cursor: s-resize"s-resize/abr

a href="#" style="cursor: w-resize"w-resize/abr

a href="#" style="cursor: text"text/abr

a href="#" style="cursor: wait"wait/abr

a href="#" style="cursor: help"help/abr

/body

11.怎样不使用页面的缓存?即每一次打开页面时不是调用缓存中的东西

META HTTP-EQUIV="Pragma" CONTENT="no-cache"

12.页面打开时自动弹出一个窗口的代码怎么写?

HTML 代码片段如下:

html

head

titleUntitled Document/title

meta http-equiv="Content-Type" content="text/html; charset=gb2312"

script language="B style="color:black;background-color:#A0FFFF"javascript/B"

!--

function MM_openBrWindow(theURL,winName,features) { //v2.0

window.open(theURL,winName,features);

}

//--

/script

/head

body bgcolor="#FFFFFF" text="#000000" onLoad="MM_openBrWindow(‘‘‘‘‘‘‘‘,‘‘‘‘,‘‘‘‘width=400,height=400‘‘‘‘)"

/body

/html

13.如何让我的页面出现一个会讲话的小人?Merlin

HTML 代码片段如下:

HTML

HEAD

TITLE默林/TITLE

META http-equiv=Content-Type content="text/html; charset=gb2312"

/HEAD

BODY

pOBJECT id=sims classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F

/OBJECT

SCRIPT

var MerlinID;

var MerlinACS;

sims.Connected = true;

MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS);

Merlin = sims.Characters.Character(MerlinID);

Merlin.Show();

Merlin.Play("Surprised");

Merlin.Speak("大家好");

Merlin.Play("GestureLeft");

Merlin.Think("我是默林!");

Merlin.Play("Pleased");

Merlin.Think("可爱吗?");

Merlin.Play("GestureDown");

Merlin.Speak("哈哈!");

Merlin.Hide();

function LoadLocalAgent(CharID, CharACS){

LoadReq = sims.Characters.Load(CharID, CharACS);

return(true);

}

/SCRIPT

/p

p /p

p看此效果必须装有office2000!!!/p

/BODY

/HTML

14.在页面中如何加入不是满铺的背景图片,拉动页面时背景图不动

HTML 代码片段如下:

htmlhead

STYLE

body  {background-image:url(logo.gif);

background-repeat:no-repeat; background-position:center }

/STYLE

/head

body bgproperties="fixed"

/body

/html

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

background-repeat:no-repeat; 是让背景图不占满整个页面

body bgproperties="fixed" 是拉动scroll时背景图不动

15.文本输入框什么属性能实现不可输入?

HTML 代码片段如下:

input type="text" name="textfield" disabled

或者

input type="text" name="textfield" readonly

16.如何禁止自己的页面在别人的框架里打开?

把以下代码加至你的head区

script

if (window.top!=self){

window.top.location=self.location

}

/script

17.如何实现首页全屏幕显示?

HTML 代码片段如下:

html

bodyscript language="B style="color:black;background-color:#A0FFFF"javascript/B"

var coolw=642

var coolh=400

var coolhuang=window.open("","coolhuang","width="+coolw+",height="+coolh+",

fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")

window.close()

/script/body/html

18.如何监听一个窗口被关闭了?

HTML 代码片段如下:

body onunload="alert(‘‘‘‘你关闭了这个窗口‘‘‘‘)"

19.如何禁止Ctrl+N?

HTML 代码片段如下:

body onkeydown=return(!(event.keyCode==78event.ctrlKey))

如何把页面加入用户的收藏夹?

HTML 代码片段如下:

a href="B style="color:black;background-color:#A0FFFF"javascript/B:window.external.AddFavorite(‘‘‘‘‘‘‘‘,‘‘‘‘无忧脚本‘‘‘‘)"收藏无忧脚本/a

如何在我的'页面中加入背景音乐?

IE: bgsound src="*.mid" loop=infinite

NS:embed src="*.mid" autostart=true hidden=true loop=true

*.mid你的背景音乐的midi格式文件

关于页面转换效果

meta http-equiv="page-enter" content="revealTrans(Duration=4,Transition=23)"

meta http-equiv="page-exit" content="revealTrans(Duration=4,Transition=23)"

说明:Transition=23是随机效果,另可以选0-22任一数字固定某个效果

如何设定打开页面的大小

HTML 代码片段如下:

body onload="top.resizeTo(300,200);"!--(width,height)--

怎样双击滚屏,单击停止?

HTML 代码片段如下:

html

head

title新网页1/title

/head

body

script language"B style="color:black;background-color:#A0FFFF"javascript/B"

var currentpos,timer;

function initialize()

{

timer=setInterval("scrollwindow()",10);

}

function sc(){

clearInterval(timer);

}

function scrollwindow()

{

currentpos=document.body.scrollTop;

window.scroll(0,++currentpos);

if (currentpos != document.body.scrollTop)

sc();

}

document.onmousedown=sc

document.ondblclick=initialize

/script

pa/ppa/ppa/ppaa/ppaa/ppaa/p

paa/ppaa/ppaa/ppaa/ppaa/ppaa/p

paa/ppaa/ppaa/ppaa/ppaa/ppaa/p

paa/ppaa/ppaa/ppaa/ppa/p

/body

/html

如何让body中的文字不被选中?

HTML 代码片段如下:

body onselectstart="return false" aaa/body

如何让弹出的窗口不能关闭?

在新开的窗口中加入如下代码

body onunload=open(location.href)

/body

如何让浏览器在保存页面时保存失败?

HTML 代码片段如下:

NOSCRIPT

B style="color:black;background-color:#ffff66"IFRAME/B SRC="*.html"

/B style="color:black;background-color:#ffff66"IFRAME/B

/NOSCRIPT

表单中如何用图片按钮实现 reset?

html

head

script

function aaa(){

document.forms[0].reset()

}

/script

/head

body

form

textarea rows="2" name="S1" cols="20"/textarea

input type="submit" values="提交" name="B1"

image src="logo.gif" onclick=aaa()

/form

/body/html

进入网页时弹出的信息对话框

body onLoad="window.alert(‘‘‘‘欢迎光临本站‘‘‘‘)"

关闭窗口后弹出对话框

body onUnload="window.alert(‘‘‘‘谢谢你的光临!欢迎下次再来!‘‘‘‘)"

告别提示

body onUnload= alert("再见,感谢你的访问!")

右键菜单的制作

OBJECT id=menu type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"

PARAM name="Command" value="Related Topics,menu"

PARAM name="Item1" value="动易;"

PARAM name="Item2" value="搜狐;"

PARAM name="Item3" value="新浪;"

PARAM name="Item4" value="网易;"

PARAM name="Item5" value="互动学院;"

/OBJECT script if (document.all) document.body.onmousedown=new Function("if (event.button==2) menu.Click();") /script

下拉菜单

object id=HHCtrl type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" PARAM name="Command" value="Related Topics,Menu" PARAM name="Item1" value="aspease;" PARAM name="Item2" value="byhu;" PARAM name="Item3" value="lzz;" /object a href=javascript:HHCtrl.Click() title="下拉菜单"下拉菜单/a

;

弹出窗口的html的代码是怎么写的?

1、最基本的弹出窗口代码

SCRIPT LANGUAGE="javascript"

!--

window.open ("page.html")

--

/SCRIPT 

window.open ("page.html") 用于控制弹出新的窗口page.html,如果page.html不与主窗口在同一路径下,前面应写明路径,绝对路径(http://)和相对路径(../)均可。

2、经过设置后的弹出窗口

SCRIPT LANGUAGE="javascript"

!--

window.open ("page.html", "newwindow", "height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")nbsp;

-

/SCRIPT

SCRIPT LANGUAGE="javascript" js脚本开始;window.open 弹出新窗口的命令;"page.html" 弹出窗口的文件名;"newwindow" 弹出窗口的名字(不是文件名),非必须,可用空"代替;

3、用函数控制弹出窗口

script LANGUAGE="JavaScript"

!--

function openwin() {

window.open ("page.html", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")

}

--

/script

这里定义了一个函数openwin(),函数内容就是打开一个窗口。

4、同时弹出2个窗口

script LANGUAGE="JavaScript"

!--

function openwin() {

window.open ("page.html", "newwindow", "height=100, width=100, top=0, left=0,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")

nbsp;

window.open ("page2.html", "newwindow2", "height=100, width=100, top=100, left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")

}

--

/script

为避免弹出的2个窗口覆盖,用top和left控制一下弹出的位置不要相互覆盖即可。

5、主窗口打开文件1.htm,同时弹出小窗口page.html

script language="javascript"

!--

function openwin() {

window.open("page.html","","width=200,height=200")

}

--

/script

html扫雷代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于html扫雷源码、html扫雷代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/30330.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载