我新建了一个.css文件代码如下:
body
{
}
#popupcontent
{
position : absolute;
visibility: hidden;
overflow: hidden;
border:1px solid #CCC;
background-color:#F9F9F9;
border:1px solid #333;
padding:5px;
}
一个JScript文件,代码如下:
// JScript 文件
var baseText = null; function showPopup(w,h)
{
var popUp = document.getElementById("popupcontent"); popUp.style.top = "200px";
popUp.style.left = "200px";
popUp.style.width = w + "px";
popUp.style.height = h + "px"; if (baseText == null)
baseText = popUp.innerHTML;
popUp.innerHTML = baseText + " <div id=\"statusbar\"> <button onclick=\"hidePopup();\">Close window <button> </div>";
var sbar = document.getElementById("statusbar"); sbar.style.marginTop = (parseInt(h)-40) + "px";
popUp.style.visibility = "visible";
}
function hidePopup()
{
var popUp = document.getElementById("popupcontent");
popUp.style.visibility = "hidden";
} 在ProvinceMap.aspx中插入一层,ID为popupcontent 然后在一个按钮事件中添加
protected void bt_InqGraph_Click(object sender, EventArgs e)
{
Response.Write(" <Script language = javascript>showPopup(50,50) </script>");
} 怎么没有反应呢?
body
{
}
#popupcontent
{
position : absolute;
visibility: hidden;
overflow: hidden;
border:1px solid #CCC;
background-color:#F9F9F9;
border:1px solid #333;
padding:5px;
}
一个JScript文件,代码如下:
// JScript 文件
var baseText = null; function showPopup(w,h)
{
var popUp = document.getElementById("popupcontent"); popUp.style.top = "200px";
popUp.style.left = "200px";
popUp.style.width = w + "px";
popUp.style.height = h + "px"; if (baseText == null)
baseText = popUp.innerHTML;
popUp.innerHTML = baseText + " <div id=\"statusbar\"> <button onclick=\"hidePopup();\">Close window <button> </div>";
var sbar = document.getElementById("statusbar"); sbar.style.marginTop = (parseInt(h)-40) + "px";
popUp.style.visibility = "visible";
}
function hidePopup()
{
var popUp = document.getElementById("popupcontent");
popUp.style.visibility = "hidden";
} 在ProvinceMap.aspx中插入一层,ID为popupcontent 然后在一个按钮事件中添加
protected void bt_InqGraph_Click(object sender, EventArgs e)
{
Response.Write(" <Script language = javascript>showPopup(50,50) </script>");
} 怎么没有反应呢?
我是刚接触ASP.NET,不是很懂
请赐教
#popupcontent
{
position : absolute;
visibility: hidden;
overflow: hidden;
border:1px solid #CCC;
background-color:#F9F9F9;
border:1px solid #333;
padding:5px;
}
怎么没有和ID为popupcontent 的层联系上啊