導航:首頁 > 萬維百科 > 選擇人員對話框網頁設計

選擇人員對話框網頁設計

發布時間:2020-10-27 22:19:33

1、如何在網頁設計按一下就彈出對話框

<script>
function DelMsg()
{
var daymsg = document.getElementById("radDay");
if(daymsg.checked == true)
{
if(window.confirm("確認投票嗎?"))
{
return true;
}else
{
return false;
}

}
}
</script>
投票按鈕
<button ... onclick="return DelMsg();" >投票</Button>

2、網頁設計,如果想實現當單擊網頁上某對象時,彈出一個消息對話框,如何指定?

您好,您可以嘗試如下代碼,不知效果是否如您所願:

<html>
<head>
<title>demo</title>
<meta charset="utf-8" />
</head>
<body>
<div id="box"></div>
<script type="text/javascript">
var box = document.getElementById("box");
box.onclick = function()
{
   alert("要彈出的消息...");
}
</script>
</body>
</html>

3、設計網頁點擊添加按鈕如何彈出對話框

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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>
<style type="text/css">
<!--
td { font-size: 9pt}
a { color: #000000; text-decoration: none}
a:hover { text-decoration: underline}
.tx { font-size: 9pt; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; height: 20px; width: 40px; background-color: #eeeeee; cursor: hand}
.bt { font-size: 9pt; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; height: 16px; width: 60px; background-color: #eeeeee; cursor: hand}
.tx1 { height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #0000FF}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加公告</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 18px}
body {
background-color: #2286c2;
}
-->
</style>
</head>

<body>
<p class="STYLE1">公告標題:</p>
<form id="form1" name="form1" method="post" action="">
<label>
<input name="textfield" type="text" size="50" />
</label>
</form>
<p class="STYLE1">公告內容:</p>
<form id="form2" name="form2" method="post" action="">
<label>
<textarea name="textarea" cols="50" rows="20"></textarea>
</label>
<p>
<p><iframe frameborder="1" width="300" height="50" scrolling="no" src="upload.asp"></iframe></p>
</p>
</form>
<form id="form3" name="form3" method="post" action="">

<label> 
<input type="submit" name="Submit" value="提交" /> 
 
</label>
<input type="submit" name="Submit2" value="重置" />
</form>

<p> </p>
</body>
</html>

4、網頁設計用javascript實現彈出對話框的一個示例

看你想怎麼樣了,只是彈出一個對話框提示消息的話,就用alert(msg),msg 是提示信息 ;
confirm 也是彈出一個對話框,但是它彈出的一個包含"確定"與"取消"的對話方塊. 如果用戶按下了確定,返回true;或者按下了取消,返回false
示例如
<body>
<script type="text/javascript">
alert("這是彈出框")
confirm("你今天開心嗎")
</script>
</body>
</html>

與選擇人員對話框網頁設計相關的知識