1. 急求一段html代碼~打開網頁後自動彈出提示!

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/absolute_layout.css"/>
<title>Absolute Test</title>
<style type="text/css">
div{width: 200px;height: 100px;position: relative;margin: 0 auto;top: 250px;background: #FFFFFF;opacity: 0.65;text-align: center;box-shadow: 2px 2px 5px #ababab;border-radius: 4px 4px;}
h4{font-size: 14px;color: #4c4c4c;position: relative;top: -10px;}
span{position: relative;cursor: pointer;}
span:first-child{left: 90px;}
span:first-child:hover{border: 1px solid #4C4C4C;}
.jx{left: -20px;top: -10px;}
.jx a{text-decoration: none;color: #4c4c4c;}
.jx a:hover{color: #FF9900;}
.qx{left: 20px;top: -10px;}
</style>
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
$("div").fadeIn(1000);
$(".gb").click(function(){
$("div").fadeOut(400);
});
$(".qx").click(function(){
$("div").fadeOut(400);
});
});
</script>
</head>
<body bgcolor="#4c4c4c">
<div style="display: none;">
<span class="gb">×</span>
<h4>我已編輯好</h4>
<span class="jx"><a href="http://www..com">繼續</a></span><span class="qx">取消</span>
</div>
<p style="color: #ff6600;">使用時,需要導入jQuery.min的開發文件</p>
</body>

2. 如何做出在html網頁中顯示窗口

做個漂浮層

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
width:350px;
height:239px;
z-index:1;
left: 385px;
top: 30px;
background-color: #39F;
}
-->
</style>
</head>

<body>
<div id="apDiv1"></div>
<script>
var win = document.getElementById("apDiv1");
var availWidth = window.screen.availWidth;
var availHeight = window.screen.availHeight;
var scrollTop = document.documentElement.scrollTop;
var scrollLeft = document.documentElement.scrollLeft;
var height = win.offsetHeight;
var width = win.offsetWidth;
var reLeft = scrollLeft + (availWidth - width) / 2;
var reTop = scrollTop + (availHeight - height) / 2;
with (win.style) {
left = reLeft + "px";
top = reTop + "px";
}

</script>
</body>
</html>

3. html單機按鈕彈出提示並跳轉頁面

<a onclick="return confirm('確認跳轉嗎?')" href="index.html">點擊跳轉</a>

4. 彈出窗口的html的代碼是怎麼寫的

1、最基本的彈出窗口代碼

< SCRIPT LANGUAGE="javascript">

< !--

window.open ("page.html")

-- >

< /SCRIPT>

window.open ("page.html") 用於控制彈出新的窗口page.html,如果.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>

5. 我需要一個「彈出提示窗口」的HTML代碼

<html>
<head>
<title>類似MSN提示的頁面效果</title>
</head>
<body scroll=no>
看到右下角的提示了嗎?如果沒有看到,<button onclick=location.reload();>刷新</button>一下
<script language="JavaScript">
window.onload = getMsg;
window.onresize = resizeDiv;
window.onerror = function(){}
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop = parseInt(document.getElementById("eMeng").style.top,10)
divLeft = parseInt(document.getElementById("eMeng").style.left,10)
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight
document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
document.getElementById("eMeng").style.visibility="visible"
objTimer = window.setInterval("moveDiv()",10)
}
catch(e){}
}

function resizeDiv()
{
i+=1
if(i>500) closeDiv()
try{
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
}
catch(e){}
}

function moveDiv()
{
try
{
if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval("resizeDiv()",1)
}
divTop = parseInt(document.getElementById("eMeng").style.top,10)
document.getElementById("eMeng").style.top = divTop - 1
}
catch(e){}
}
function closeDiv()
{
document.getElementById('eMeng').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}
</script>
<DIV id=eMeng style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX:99999; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 180px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 116px; BACKGROUND-COLOR: #c9d3f3">
<TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0>
<TBODY>
<TR>
<TD style="FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #0f2c8c" width=30 height=24></TD>
<TD style="FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #1f336b; PADDING-TOP: 4px;PADDING-left: 4px" vAlign=center width="100%"> 短消息提示:</TD>
<TD style="BACKGROUND-IMAGE: url(msgTopBg.gif); PADDING-TOP: 2px;PADDING-right:2px" vAlign=center align=right width=19><span title=關閉 style="CURSOR: hand;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick=closeDiv() >×</span><!-- <IMG title=關閉 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg"> --></TD>
</TR>
<TR>
<TD style="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: url(1msgBottomBg.jpg); PADDING-BOTTOM: 1px" colSpan=3 height=90>
<DIV style="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%">您有<font color=#FF0000>1</font>封新短消息<BR><BR>
<DIV align=center style="word-break:break-all"><a href="javascript:alert('你好')"><font color=#FF0000>點擊查看簡訊</font></a></DIV

</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</body>
</html>

6. 在網頁頁面上顯示 html 代碼

你可以使用Macromedia
Dreamweaver
切換到設計視圖
把輸入的HTML代碼就會原樣顯示在IE中..

7. 如何在網頁上顯示html代碼

頁面中顯示HTML標簽源來代碼源

歸納幾種方法,根據需求選用:
a: 把代碼寫在文本區域 <textarea> 標簽中。可以設置 disabled="disabled" 屬性,禁止用戶操作。
b: 把要顯示在html文檔中標簽的 "<"、">" 用實體字元替換掉。如:&lt;p&gt&lt;/p&gt;外層嵌套<pre>標簽可使頁面與HTML格式一致。
C: 用程序批量替換。

8. 像這樣網頁上方出現圖中升級提示的html代碼怎麼寫

直接用段js判斷用戶當前的瀏覽器,如果不是2345瀏覽器就彈出上面的那段話。

9. html關閉頁面的時候出現一個提示,代碼是多少

<script>
window.onbeforeunload=function(){
return"確定離開頁面嗎?";
}
</script>