sxh2213499 2014-08-14 02:32
浏览 1262
已结题

DIV 弹出层没办法实现

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



Insert title here #popupcontent{ position: absolute; visibility: hidden; overflow: hidden; border:1px solid #CCC; background-color:#F9F9F9; border:1px solid #333; padding:5px;} var baseText = null; function showPopup(w,h){ ar 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/"><input type=/"button/" value=/"Closewindow/" onClick=/"hidePopup()/"></div>"; var sbar = document.getElementById("statusbar"); sbar.style.marginTop = (parseInt(h)-60) + "px"; popUp.style.visibility = "visible"; } function hidePopup() { var popUp = document.getElementById("popupcontent"); popUp.style.visibility = "hidden"; }



这是一个DIV弹窗效果!

将鼠标移动到此


点击这里查看弹出窗口



请帮忙看下代码有什么问题没

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作