飞溅屏幕消失



我找到了一些启动屏幕的代码,但我需要解决一个问题:

当我运行HTA程序时,启动屏幕会正常弹出。但是,如果我点击桌面,启动屏幕就会消失,有什么方法可以解决这个问题吗?

<html>
<head>
  <title>Splash Screen</title>
  <script type="text/vbscript">
  Dim oPopup
  Set oPopup = window.createPopup()
  Function goContext()
    Dim oPopupBody
    Set oPopupBody= oPopup.document.body
    oPopupBody.innerHTML = oContext.innerHTML
    call oPopup.show(275, 200, 400, 300, document.body)
  End Function
  </script>
</head>
<body onload="goContext()" onmousedown="oPopup.hide">
  <!-- Splash Screen -->
  <div ID="oContext" style="display:none" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
            <div style="position:absolute; top:0; left:0; width:400px; height:300px; border:1px solid black; background:#eeeeee;" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
      <div style="padding:20px; background:white; border-bottom:5px solid #cccccc" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
        <b onselectstart="return false" ondragstart="return false" oncontextmenu="return false"><h2 align="center"><i>Game Launcher </i><small><sub>ver: 1.00</sub></small></h2></b>
      </div>
      <div style="padding:20px; font-size:8pt; line-height:1.5em; font-family:verdana; color:black;" onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
        <center onselectstart="return false" ondragstart="return false" oncontextmenu="return false">
          <marquee DIRECTION="UP" HEIGHT="100" WIDTH="300" SCROLLAMOUNT="1" onselectstart="return false">Le text goes here</marquee>
          <br /><br />
          <b>&#169;2013 Petzl11 Development.</b>
        </center>
      </div>
    </div>
  </div>
  <center>
    <button onclick="goContext()">Show Splash Screen</button><br>
    <b>Internet Explorer Only!</b>
  </center>
</body>
</html>

这是我最初想做的,但你帮我做的这个很完美,下面这个是.vbs:这是链接

经过一些交互式调试后的工作代码(样式属性未正确关闭)。

<html>
<head>
  <HTA:APPLICATION selection="no" contextmenu="no" />
  <title>Splash Screen</title>
  <script type="text/vbscript">
  Dim oPopup
  Set oPopup = window.createPopup()
  Function goContext()
    Dim oPopupBody
    Set oPopupBody= oPopup.document.body
    oPopupBody.innerHTML = oContext.innerHTML
    call oPopup.show(275, 200, 400, 300, document.body)
  End Function
  </script>
</head>
<body onload="goContext()" onmousedown="oPopup.hide">
  <!-- Splash Screen -->
  <div ID="oContext" style="display:none">
    <div style="position:absolute; top:0; left:0; width:400px; height:300px; border:1px solid black;background:#eeeeee;">
      <div style="padding:20px; background:white; border-bottom:5px solid #cccccc">
        <b><h2 align="center"><i>Game Launcher</i> <small><sub>ver: 1.00</sub></small></h2></b>
      </div>
      <div style="padding:20px; font-size:8pt; line-height:1.5em; font-family:verdana; color:black;">
        <center>
          <marquee direction="up" height="100" width="300" scrollamount="1">Le text goes here</marquee>
          <br><br>
          <b>&#169;2013 Petzl11 Development.</b>
        </center>
      </div>
    </div>
  </div>
  <!-- End Splash Screen -->
  <center>
    <button onclick="goContext()">Show Splash Screen</button><br>
    <b>Internet Explorer Only!</b>
  </center>
</body>
</html>

记下<HTA:APPLICATION>元素并阅读其文档。

最新更新