1、html網頁輸入文字 點擊按鈕彈出一個窗口
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>My Test Document</title>
<style>
.box{
width:50%; margin-top:10%; margin:auto; padding:28px;
height:350px; border:1px #111 solid;
display:none; /* 默認對話框隱藏 */
}
.box.show{display:block;}
.box .x{ font-size:18px; text-align:right; display:block;}
.box input{width:80%; font-size:18px; margin-top:18px;}
</style>
</head>
<body>
<h2>測試</h2>
<input type="button" onClick="msgbox(1)" value="點擊彈出輸入框">
<script>
function msgbox(n){
document.getElementById('inputbox').style.display=n?'block':'none'; /* 點擊按鈕打開/關閉 對話框 */
}
</script>
<div id='inputbox' class="box">
<a class='x' href=''; onclick="msgbox(0); return false;">關閉</a>
<input type="text">
<input type="text">
<input type="button" value="確定">
</div>
</body>
希望我的回答可以幫到您哦
2、如何在html網頁上點擊按鈕彈出登陸窗口(登陸窗口裡面的代碼如何與資料庫相連,窗口是浮動的)要代碼
1、確認無誤後,打開python編輯器pycharm,然後新建一個文件,叫做tkinter_t.py。

2、內容編輯完畢,確認無誤後,點擊pycharm編輯器最上方的run選項卡。然後再點擊下方的run選項。

3、然後會彈出一個窗口,讓你選擇需要運行的python文件,選擇剛才創建的tkinter_t.py,然後就會開始執行。彈出我們的測試窗口。

4、繼續在基礎上進行優化。優化後的命令總共分兩段。

5、首先用Tk()這個模塊創建一個窗口windows,然後定義一個按鈕button,按鈕的名稱是press,按下去以後的響應命令command是剛才定義的reply函數。

6、代碼確認無誤後,點擊pycharm頁面右上角的tkinter_t.py文件名旁邊的綠色三角按鈕,開始運行代碼。

7、剛創建的窗口是個很小的窗口,只顯示了一個按鈕的高度。

3、html點擊按鈕彈出窗口如何實現?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
.firstBox h5 {
font-size: 30px;
color: #000;
font-weight: 700;
}
.firstBox table {
border: 1px solid #E6E6E6;
margin: 15px 0px;
}
.firstBox table thead {
background: #E6E6E6;
}
.firstBox table tr td {
width: 150px;
text-align: center;
}
.firstBox button {
width: 100px;
height: 40px;
background: #E6E6E6;
border: 1px solid #C7D3E6;
text-align: center;
line-height: 40px;
font-size: 16px;
color: #000;
cursor: pointer;
}
#twoBox {
margin: 20px 0px 0px;
background: #E6E6E6;
height: 250px;
width: 310px;
position: relative;
display: none;
}
#twoBox .twoBox_lever {
width: 290px;
height: 230px;
background: #fff;
border: 1px solid #ccc;
border-radius: 5px;
position: absolute;
right: 0;
top: 0;
left: 0;
bottom: 0;
margin: auto;
}
.twoBox_lever_two {
width: calc(100% - 10px);
height: calc(100% - 10px);
padding: 5px;
}
.twoBox_lever_two .two_title {
width: 100%;
height: 40px;
background: #E6E6E6;
border: 1px solid #ccc;
border-radius: 5px;
}
.twoBox_lever_two .two_title p {
font-size: 16px;
color: #000;
line-height: 40px;
padding-left: 10px;
font-weight: 700;
}
.twoBox_lever_two form {
width: calc(100% - 20px);
margin: 10px;
border-bottom: 1px solid #ccc;
height: calc(100% - 100px);
}
.twoBox_lever_two form input {
height: 20px;
line-height: 20px;
padding: 0px 10px;
margin: 5px;
cursor: pointer;
}
.twoBox_lever_two .two_footer {
height: 40px;
text-align: right;
padding-right: 10px;
}
.twoBox_lever_two .two_footer button {
height: 30px;
background: #E6E6E6;
border: 1px solid #C7D3E6;
text-align: center;
line-height: 30px;
font-size: 16px;
color: #000;
cursor: pointer;
}
.twoBox_lever_two .two_footer button:first-of-type {
width: 120px;
padding: 0px 10px;
}
.twoBox_lever_two .two_footer button:last-of-type {
width: 50px;
}
.show {
display: block !important;
}
</style>
</head>
<body>
<div style="margin:10px;">
<!-- 第一部分 -->
<div class="firstBox">
<h5>已有的用戶 :</h5>
<table>
<thead>
<tr>
<th>名字</th>
<th>郵箱</th>
<th>密碼</th>
</tr>
</thead>
<tbody>
<tr>
<td>姓名</td>
<td>[email protected]</td>
<td>xingtuan</td>
</tr>
</tbody>
</table>
<button id="button">創建新用戶</button>
</div>
<!-- 第二部分 -->
<div id="twoBox">
<div class="twoBox_lever">
<div class="twoBox_lever_two">
<div class="two_title">
<p>創建新用戶</p>
</div>
<form>
<label style="float:left">名字:
<input type="text" placeholder="請輸入名字">
</label>
<label style="float:left">郵箱:
<input type="text" placeholder="請輸入郵箱">
</label>
<label style="float:left">密碼:
<input type="password" placeholder="請輸入密碼">
</label>
</form>
<div class="two_footer">
<button>創建一個用戶</button>
<button>取消</button>
</div>
</div>
</div>
</div>
</div>
</body>
<script>
window.onload = function () {
document.getElementById("button").onclick = function () {
document.getElementById("twoBox").classList.add("show")
}
}
</script>
</html>
4、設計網頁點擊添加按鈕如何彈出對話框
<%@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>
5、關於網頁製作:怎樣在網頁中點擊按鈕,然後彈出新窗口?
的window.open('page.html的','newwindow','高度= 100,寬= 400,= 0,左= 0時,工具欄=沒有,菜單=沒有,滾動條=沒有,可調整大小=沒有,位置=沒有狀態=沒有)
6、網頁點擊按鈕彈出信息框?
彈出信息框.並且打開一個網頁地址. 按鈕部分:屬性里加上onclick="fun()" head區域添加代碼: function fun(){ window.open("要彈出的網址","_blank","width=200,height=300") } </script> 參數可自行修改
7、怎麼在頁面中設置,點擊按鈕彈出一個帶有輸入框的對話框
聽好,我用VC++作例子。
1.在資源視圖中(也就是那個resource)找到dialog,右鍵(看見那個insert點擊它)新建dialog,命名隨便你自己取,比如DLG,這個dialog就是你要點擊後出來的對話框,樓主自己對這個對話框進行設計。
2.找到你要點擊的按鈕,雙擊,在顯示的函數中添加一下代碼:
DLG dlg;
dlg.DoModal();
3.在當前的文件中的最前面添加#include"DLG.h"
4.運行程序。
8、點擊按鈕在本頁面彈出窗口
http://sandbox.runjs.cn/show/au8izuk5 這個你可以借鑒一下,代碼你可以在瀏覽器上右鍵,查看源代碼;然後修改修改裡面的html應該就可以了
9、急用:網頁設計:如何用JS實現:單擊按鈕就新打開一個的窗口,並設計該窗口的的長度和寬度
<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=n o, status=no') //這句要寫成一行
-->
</SCRIPT>
參數解釋:
<SCRIPT LANGUAGE="javascript"> js腳本開始;
window.open 彈出新窗口的命令;
'page.html' 彈出窗口的文件名;
'newwindow' 彈出窗口的名字(不是文件名),非必須,可用空''代替;
height=100 窗口高度;
width=400 窗口寬度;
top=0 窗口距離屏幕上方的象素值;
left=0 窗口距離屏幕左側的象素值;
toolbar=no 是否顯示工具欄,yes為顯示;
menubar,scrollbars 表示菜單欄和滾動欄。
resizable=no 是否允許改變窗口大小,yes為允許;
location=no 是否顯示地址欄,yes為允許;
status=no 是否顯示狀態欄內的信息(通常是文件已經打開),yes為允許;
</SCRIPT> js腳本結束
10、網頁點擊按鈕彈出提示窗口
是這樣的 在javascript裡面寫上一個函數 它的格式是:
function "由你自己命名的函數名" (){
if(confirm())
{
close();
}
}
然後在調用這一個函數
調用的方法 : onClick("由你自己命名的函數名()")