!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 title 自定义弹出对话框 /title style type="text/css" *{margin:0;padding:0
if ( !document.getElementById("SpID"))
{
divSp.setAttribute("id", "SpID");
divSp.style.position="absolute";
divSp.style.padding="10px";
divSp.style.width="10px";
divSp.style.height="10px";
divSp.style.zIndex="5000";
divSp.style.top=evnt.clientY+document.body.scrollTop+document.documentElement.scrollTop+"px";
divSp.style.left=evnt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft+"px";
divSp.style.border="1px dotted #576999";
divSp.style.backgroundColor="#E4E7EF";
divSp.innerHTML="";
document.body.appendChild(divSp);
OpenDiv();
}
if ( !document.getElementById("SubInfo"))
{
btnSub.setAttribute("id", "SubInfo");
btnSub.type="button";
btnSub.style.width="50px";
btnSub.style.position="absolute";
btnSub.style.top="80%";
btnSub.style.left="50%";
btnSub.value="提交";
btnSub.onclick=function(){
//document.getElementById("SpIDs").innerHTML=document.getElementById("music").value;
//CloseDiv();
document.body.removeChild(divSp);
};
document.getElementById("SpID").appendChild(btnSub);
}
}
function OpenDiv()
{
var divopen = document.getElementById("SpID");
if ( divopen.offsetWidth {
divopen.style.width=divopen.offsetWidth + 5 + "px";
}
if ( divopen.offsetHeight 400)
{
divopen.style.height=divopen.offsetHeight + 1 + "px";
}
act=setTimeout("OpenDiv()", 20);
if(divopen.offsetHeight > 300 && divopen.offsetWidth > 400)
{
clearTimeout(act);
}
}
function CloseDiv()
{
var divopen = document.getElementById("SpID");
if ( divopen.offsetWidth >= 0 )
{
//divopen.style.width=5 - divopen.offsetWidth + "px";
}
if ( divopen.offsetHeight >= 0 )
{
divopen.style.height=divopen.offsetHeight - 2 + "px";
}
setTimeout("OpenDiv()", 2);
}
<script><br /> alert(document.getElementById("btnValue").offsetWidth);<br /> </script>

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

SecLists
SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。

SublimeText3漢化版
中文版,非常好用

Dreamweaver Mac版
視覺化網頁開發工具