我不懂javascript,我在网页中发现这段代码,不清楚是做什么的。

解决方案 »

  1.   

    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
    newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
    newWindow.document.open();
    newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#000000" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
    newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
    }
    //-->
    </script>
    <body onload=openPictureWindow_Fever("killerj",200,200,"http://www.killerj.tk",100,100)>
      

  2.   

    <body onload=openPictureWindow_Fever("killerj",200,200,"http://www.killerj.tk",100,100)>加一句这个就可以了~!
      

  3.   

    定义了function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) 
    这个函数打开新窗口
    imageName新窗口中的图片
    imageWidth,imageHeight图片的宽度和高度
    posLeft,posTop新窗口的坐标
      

  4.   

    跟这个网站有啥关系?
    http://www.killerj.tk
      

  5.   

    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
    newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
    newWindow.document.open();
    newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
    newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
    }//这个函数,就是打开一个窗口,这个窗口用来显示图片文件的.
    //有imageName,imageWidth,imageHeight,alt,posLeft,posTop这些参数得设置
    //图片文件名,图像宽,图像高,提示信息,打开窗口的左位置,顶位置.
    openPictureWindow_Fever('csdn.gif','100','50','alt','50','50')
    //-->
    </script>