html常用代码大全-网页代码大全( 四 )


/body
/html
怎么样让我的页面出现一个会讲话的小人?Merlin
HTML 代码片段如下:
HTML
HEAD
TITLE默林/TITLE
META.
/HEAD
BODY
pOBJECT id=sims classid=CLSID
45FD31B-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("
leased");
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
在页面中怎么样加入不是满铺的背景图片,拉动页面时背景图不动
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時背景圖不動
文本输入框什么属性能实现不可输入?
HTML 代码片段如下:
input type="text" name="textfield" disabled
或者
input type="text" name="textfield" readonly
怎么样禁止自己的页面在别人的框架里打开?
把以下代码加至你的head区
script
if (window.top!=self){
window.top.location=self.location
/script
怎么样实现首页全屏幕展现?
HTML 代码片段如下:
html
bodyscript. language="B style="color:black;background-color:#A0FFFF"javascript/B"
var coolw=642
var coolh=400
var coolhuang=window.open("+",
fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")
window.close()
/script/body/html
怎么样监听一个窗口被关闭了?
HTML 代码片段如下:
body
怎么样禁止Ctrl+N?
HTML 代码片段如下:
body nkeydown=return(!(event.keyCode==78event.ctrlKey))
怎么样把页面加入玩家的收藏夹?
HTML 代码片段如下:
a href=https://www.wangchuang8.com/"B style="color:black;background-color:#A0FFFF"javascript/B:window.external.AddFavorite(‘‘‘‘
怎么样在我的页面中加入背景音乐?
IE: bgsound src=https://www.wangchuang8.com/"*.mid" loop=infinite
NS:embed src=https://www.wangchuang8.com/"*.mid" autostart=true hidden=true loop=true
*.mid你的背景音乐的midi格式文件
关于页面转换效果
meta.

meta.
说明:Transition=23是随机效果 。另可以选0-22任一数字特定某个效果
怎么样设定打开页面的大小
HTML 代码片段如下:
body !--(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 aaa/body
怎么样让弹出的窗口不可以关闭?
在新开的窗口中加入如下代码
body nunload=open(location.href)
/body
怎么样让浏览器在保存页面时保存失败?
HTML 代码片段如下:
NOSCRIPT
B style="color:black;background-color:#ffff66"IFRAME/B SRC=https://www.wangchuang8.com/"*.html"
/B style="color:black;background-color:#ffff66"IFRAME/B
/NOSCRIPT
表单中怎么样用图片按钮实现 reset?

推荐阅读