function JS_Win(theUrl,theTitle,theWidth,theHeight) {
  window.open(theUrl,theTitle,"width="+theWidth+",height="+theHeight);
 }例如打开的是一个文件,窗口标题会显示成 http://192.168.0.1/Test/aaa.jpg(网址+文件名)
能否通过JS自定义该标题呢?用一个窗口内嵌文件,通过传参数是可以实现更改,不知道有没更好的办法。最好是用JS打开时自定义。

解决方案 »

  1.   

    新窗口代码内写上<TITLE></TITLE>,何必费力呢?呵呵
      

  2.   

    不是,关键我打开的直接是一个文件如 http://192.168.0.1/test/aaa.jpg 不用再加多个窗口内嵌。
      

  3.   

    原来是这样啊。那没办法。不要打开新窗口,用DIV代替可以吗
      

  4.   

    如果没办法就只有用DIV来代替了,我是想在打开一个指定页面,包含文件的方式显示。
      

  5.   

      function JS_Win(theUrl, theTitle, theWidth, theHeight) {
                var win = window.open(theUrl, theTitle, "width=" + theWidth + ",height=" + theHeight);
                win.document.title = theTitle;
            }