ttyp: 没听明白你的意思? 能说清楚一些吗?

解决方案 »

  1.   

    http://www.cnblogs.com/ttyp/你下载code collection,里面的提示都是自动消失的
      

  2.   

    那个alert的代码是你写的还是那个abc.asp里的
    要不是你写的,那就找个砝码把回车键按下去就可以了
    要是你写的,我以前写过一个alert的程序,可以控制的,你试试看吧,代码如下:
    <!--a.htm-->
    <script language="JavaScript">
    <!--
    //alert();
    function Alert(strText){
    var pWin=window.showModalDialog("b.htm",strText,"dialogHeight:116px; dialogWidth:232px; help: No; resizable: no; status: No; scroll:no; dialogTop:"+(screen.height-116)/2+"px; dialogLeft:"+(screen.width-232)/2+"px;");
    }
    Alert("用户名非法!");
    //-->
    </script>
    <!--b.htm--><html>
    <head>
    <style type="text/css">
    body{ }
    td,input{ font-size:12px}
    </style>
    <script language="JavaScript">
    <!--
    var str  =  window.dialogArguments;
    function doOk(){
    window.returnValue="";
    window.close();}
    //-->
    </script>
    <title align="center">--==提示信息==--</title>
    </head>
    <body style="background-color:buttonface; margin:0" >
    <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
    <tr height="65%">
    <td width="25%" align="center" valign="center"><img src="warning.gif" style="width:32px; height:32px"></td>
    <td valign="middle">
    <script language="JavaScript">
    <!--
    document.write(str);
    //-->
    </script>
    </td>
    </tr>
    <tr height="35%">
    <td colspan="2" align="center" valign="top">
    <input type="button" id="btnOk" value="  确定  " onclick="doOk()">
    </td>
    </tr>
    </table>
    </body>
    <script language="JavaScript">
    <!--
    document.onclick=function (){
    document.getElementById("btnOk").focus();
    }
    document.body.oncontextmenu=function (){
    document.getElementById("btnOk").focus();
    }
    //-->
    </script>
    <html>图片传不上来,就是window系统里的图片,自己找找吧
      

  3.   

    那个alert的代码不是我写的,是那个abc.asp里的,我无法做任何修改的。
      

  4.   

    ttyp: 那个出现 alert提示的代码我无法去改的! 兄弟! zhaoxiaoyang(梅雪香@hisoft): "要不是你写的,那就找个砝码把回车键按下去就可以了" ---这句还不是很明白!
      

  5.   

    要是你的控制网页是在你的本机运行时,你可以做成HTA,这样你就会有权去修改别人的网页!
      

  6.   

    不可能做到。想都不要想,除非不用alert();
      

  7.   

    A.htm:
    ---------
    <iframe style="display:none" name=if0 ></iframe>
    <input type=button value="autoRequest" onclick="autoRequest();"><br>
    <script language=javascript >
    function autoRequest()
    {
       if0.showModelessDialog("C:/Documents and Settings/Administrator.JK/Desktop/a1.html?a=1&b=2&c=3","","status:no;resizable:no;help:no;dialogHeight:height:30px;dialogHeight:40px;");
       setTimeout("if0.location.reload();setTimeout('autoRequest();',10);",3000);
    }
    </script>
    C:/Documents and Settings/Administrator.JK/Desktop/a1.html
    接受请求的页面,可以是其它域的页面
    ---------<script>
    alert("request at "+new Date());
    </script>
      

  8.   

    人家已经说明了,用的alert,而且代码改不了。
      

  9.   

    没有想改http://www.xxx.com/abc.jsp这个页面的代码的意思
    只是用C:/Documents and Settings/Administrator.JK/Desktop/a1.html来演示一下效果
      

  10.   

    //帮他介绍下代码,不错,想法!
    //在控制页建一个框架,然后把提交页在这个框的非模式窗口打开,它会弹出确定,
    //说明你提交成功,
    //刷新框,非模式窗口自动关闭,IE自己来,
    //它会强制关闭确定
    //重复上面<iframe style="display:" name=if0 ></iframe>
    <input type=button value="autoRequest" onclick="autoRequest();"><br>
    <script language=javascript >
    function autoRequest()
    {
       if0.showModelessDialog("javascript:alert();","","status:no;resizable:no;help:no;dialogHeight:height:30px;dialogHeight:40px;");
       setTimeout("if0.location.reload();setTimeout('autoRequest();',10);",3000);
    }
    </script>//有一事想不能,为什么当那个确定得到焦点时复制到的内容会是下面的?
    ---------------------------
    Microsoft Internet Explorer
    ------------------------------------------------------
    确定   
    ---------------------------
      

  11.   

    to  JK_10000(JK): 问题似乎解决了!
    但是我一测试,还发现一个问题.
    继续上面的假设,我按照 JK_10000 提供的方法改进程序后。abc.jsp 里如果有动态操作代码的话,只会执行一次,在后面的 showModelessDialog() 只是调用缓存的了。当然把a.htm 关掉后,重新打开过,又会真正的执行一次。(除非我在IE里设置好“每次访问该页时检查”的话才如愿!)那在某种意义上,我本来是“每隔一秒钟做一次表单提交操作”,使用JK_10000(JK) 方法后,表面上是 “每隔一秒钟做一次表单提交”,但是执行结果,实际上是只提交操作一次。
      

  12.   

    XMLHTTP
    HTTP 的 Socket
      

  13.   

    回复人: qidizi(qidizi) ( ) 信誉:100  2005-08-30 11:22:00  得分: 0  
    ---也不知是怎么回事回复人: onetop(玩极) ( ) 信誉:99  2005-08-30 14:27:00  得分: 0  
    ---缓存问题,在url后带个随机数就可以解决回复人: mrshelly(Shelly) ( ) 信誉:100  2005-08-30 14:29:00  得分: 0  
    也应该可以达到效果,应该更符合楼主要求
      

  14.   

    测了一下,方法不错。很巧妙-------------
    a.htm
    -------------
    <iframe style="display:none" name=if0 ></iframe>
    <input type=button value="autoRequest" onclick="autoRequest();"><br>
    <script language=javascript >
    function autoRequest()
    {
       if0.showModelessDialog("C:/b.htm","","status:no;resizable:no;help:no;dialogHeight:height:30px;dialogHeight:40px;");
       setTimeout("if0.location.reload();",3000);
    }
    </script>---------------
    c:\b.htm
    ---------------<script>
       alert("request at "+new Date());
    </script>可以看出JK兄的脚本水平已经达到了极致。
      

  15.   

    我倒想起来一个办法,重载alert函数
    <script language=javascript>
    function window.alert(str){
    //这里为空
    }
    alert("fffffff");
    </script>
    把重载后的alert函数定义function window.alert(str){}放到一个公共的js文件中 就再不受alert的麻烦了如果还要提示的话,采用这样的办法定义
    function window.alert(str){
       // 在这里打开一个模式对话框 显示str字符串  延时 20ms关闭 即可
    }
      

  16.   

    cxz7531(大花猫) : 明显没看我上面说的要求! 前提已经写得很明的了,还在搞什么重载。!JK_10000(JK): 感谢! jk 你的确是一个高手! 佩服。先给大伙们欣赏一下你的杰作,而后在这二天我会结贴。另外为了感谢你的高水平表现,我会再另开一个贴子,再给你送分!
      

  17.   

    好象不行吧。
    不过用xmlhttp提交然后解析结果到是一个不错的办法。
    至少可以实现你想要的结果。
    那样alert()根本就不会被运行。//////////////////////////////
    >我倒想起来一个办法,重载alert函数
    ><script language=javascript>
    >function window.alert(str){
    >//这里为空
    >}
    是不是学OO玩过火了,测试过了么?不要毒害别人啊。