按钮弹小窗

1.html代码

<div id="window" class="window_css">
    <form id="msg" >
        <div id="contact_info">
            </br></br></br>
            <input name="tname" placeholder="名称" style="margin-left:100px;padding: 8px 10px;outline:none;border: 1px solid #96a5b4;border-radius: 3px;height:24px;width:150px; background:none;" type="text" />
            <input name="tplace" placeholder="地点" style="margin-left:110px;padding: 8px 10px;outline:none;border: 1px solid #96a5b4;border-radius: 3px;height:24px;width:150px; background:none;" type="text" />
            </br></br></br>
            <input name="stime" placeholder="开始" style="margin-left:100px;padding: 8px 10px;outline:none;border: 1px solid #96a5b4;border-radius: 3px;height:24px;width:150px; background:none;" type="time" />
            <input name="etime" placeholder="结束" style="margin-left:110px;padding: 8px 10px;outline:none;border: 1px solid #96a5b4;border-radius: 3px;height:24px;width:150px; background:none;" type="time" />
            </br></br></br>
            <input name="date" placeholder="日期" style="margin-left:100px;padding: 8px 10px;outline:none;border: 1px solid #96a5b4;border-radius: 3px;height:24px;width:150px; background:none;" type="date" />
            </br></br></br>
            <input id="restores" style="margin-left:120px;width:145px; height:45px;" type="button" value="确定" />
            <input style="margin-left:120px;width:145px; height:45px;" type="button" value="关闭" href="javascript:void(0)" onclick="hideWindow()">
        </div>
    </form >
</div>
<div id="shadow" class="shadow_css"></div>

2.js代码

function displayWindow() {
		/*悬浮窗口的显示,需要将display变成block*/
		document.getElementById("window").style.display = "block";
		/*将背景变暗*/
		document.getElementById("shadow").style.display = "block";
	    document.getElementById("msg").style.display = "block";
	}

	/*当点击调用此方法,将悬浮窗口和背景全部隐藏*/
	function hideWindow() {
		document.getElementById("window").style.display = "none";
		document.getElementById("shadow").style.display = "none";
		document.getElementById("msg").style.display = "none";
	}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值