<!DOCTYPE html PUBLIC
//W
C//DTD XHTML
Transitional//EN
transitional
dtd
>
<html xmlns=
xml:lang=
zh
CN
lang=
zh
CN
>
<head>
<meta name=
verify
v
content=
P
T
fFCiPVxqMWZ
eztyXVzMHlnwD
wLQOq
LBHN
Y
=
/>
<title>政策文件_中國電力工程造價信息網</title>
<meta http
equiv=
Content
Type
content=
text/html; charset=gb
/>
<meta http
equiv=
Content
Language
content=
gb
/>
<meta name=
KeyWords
content=
電力工程造價
價格信息
裝材
設備
電力工程
/>
<meta name=
description
content=
電力工程造價信息
/>
<style type=
text/css
>
*{
margin:
;padding:
;
}
</style>
</head>
<body>
<div class=
cecmbody
id=
cecmpolicy
>
<div class=
leftClass
>
<a href=;網頁教學網</a>
<input type=
button
value=
點擊這裡
onclick=
sAlert(
hello
);
/>
</div>
<div class=
rightClass
>
</div>
</div>
<script type=
text/javascript
language=
javascript
>
//Author:Daviv
//Blog:
//Date:
//Email:
function sAlert(str){
var msgw
msgh
bordercolor;
msgw=
;//提示窗口的寬度
msgh=
;//提示窗口的高度
titleheight=
//提示窗口標題高度
bordercolor=
#
;//提示窗口的邊框顏色
titlecolor=
#
CCFF
;//提示窗口的標題顏色
var sWidth
sHeight;
sWidth=document
body
offsetWidth;
sHeight=screen
height;
var bgObj=document
createElement(
div
);
bgObj
setAttribute(
id
bgDiv
);
bgObj
style
position=
absolute
;
bgObj
style
top=
;
bgObj
style
background=
#
;
bgObj
style
filter=
progid:DXImageTransform
Microsoft
Alpha(style=
opacity=
finishOpacity=
;
bgObj
style
opacity=
;
bgObj
style
left=
;
bgObj
style
width=sWidth +
px
;
bgObj
style
height=sHeight +
px
;
bgObj
style
zIndex =
;
document
body
appendChild(bgObj);
var msgObj=document
createElement(
div
)
msgObj
setAttribute(
id
msgDiv
);
msgObj
setAttribute(
align
center
);
msgObj
style
background=
white
;
msgObj
style
border=
px solid
+ bordercolor;
msgObj
style
position =
absolute
;
msgObj
style
left =
%
;
msgObj
style
top =
%
;
msgObj
style
font=
px/
em Verdana
Geneva
Arial
Helvetica
sans
serif
;
msgObj
style
marginLeft =
px
;
msgObj
style
marginTop =
+document
documentElement
scrollTop+
px
;
msgObj
style
width = msgw +
px
;
msgObj
style
height =msgh +
px
;
msgObj
style
textAlign =
center
;
msgObj
style
lineHeight =
px
;
msgObj
style
zIndex =
;
var title=document
createElement(
h
);
title
setAttribute(
id
msgTitle
);
title
setAttribute(
align
right
);
title
style
margin=
;
title
style
padding=
px
;
title
style
background=bordercolor;
title
style
filter=
progid:DXImageTransform
Microsoft
Alpha(startX=
startY=
finishX=
finishY=
style=
opacity=
finishOpacity=
);
;
title
style
opacity=
;
title
style
border=
px solid
+ bordercolor;
title
style
height=
px
;
title
style
font=
px Verdana
Geneva
Arial
Helvetica
sans
serif
;
lor=
white
;
title
style
cursor=
pointer
;
title
innerHTML=
關閉
;
title
onclick=function(){
document
body
removeChild(bgObj);
document
getElementById(
msgDiv
)
removeChild(title);
document
body
removeChild(msgObj);
}
document
body
appendChild(msgObj);
document
getElementById(
msgDiv
)
appendChild(title);
var txt=document
createElement(
p
);
txt
style
margin=
em
txt
setAttribute(
id
msgTxt
);
txt
innerHTML=str;
document
getElementById(
msgDiv
)
appendChild(txt);
}
</script>
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19179.html