当前位置:编程学习 > C#/ASP.NET >>

JS一直提示缺少右括号 纠结 十万火急

一直提示缺少 ) 郁闷啊 怎么找 也找不到

<img id="image2" alt="" style="width:200px; height:200px; cursor: hand;" onclick="javascript:openwindow('7ffdbeb3b51a4c659434d59a4fd994f4')" 
                                onload="javascript:DrawImage(this,200px,200px);" title="点击看大图" src="Admin/CompanyInfoPic_Show.aspx?CompanyCode=7ffdbeb3b51a4c659434d59a4fd994f4" />

调用的脚本

<script type="text/javascript">
        function openwindow(src)
      {
        window.alert(src);
              var width=540;
              var height=420;
              window.alert("./Admin/CompanyInfoPic_Show.aspx?CompanyCode="+src,"winhik","toolbar=no,width="+width+",height="+height+",top="+(screen.availheight-height)/2+",left="+(screen.availwidth-width)/2+",resizable=yes,scrollbars=yes");
              var newin=window.open("./Admin/CompanyInfoPic_Show.aspx?CompanyCode="+src,"winhik","toolbar=no,width="+width+",height="+height+",top="+(screen.availheight-height)/2+",left="+(screen.availwidth-width)/2+",resizable=yes,scrollbars=yes");
              newin.focus();
              return newin;
     }
function openwin(src)
{   
   var newin= window.open(src);
   newin.focus();
   return(newin);
}
 
        function DrawImage(ImgD,FitWidth,FitHeight) 
          { 
             var image=new Image(); 
             image.src=ImgD.src; 
             if(image.width>0 && image.height>0) 
             { 
                 if(image.width/image.height>= FitWidth/FitHeight) 
                  { 
                     if(image.width>FitWidth) 
                       { 
                           ImgD.width=FitWidth; 
                           ImgD.height=(image.height*FitWidth)/image.width; 
                        } 
                     else 
                        { 
                           ImgD.width=image.width; 
                           ImgD.height=image.height; 
                         } 
                 }      
                else 
                { 
                    if(image.height>FitHeight) 
                      { 
                         ImgD.height=FitHeight; 
                         ImgD.width=(image.width*FitHeight)/image.height; 
                       } 
                    else 
                      { 
                         ImgD.width=image.width; 
                         ImgD.height=image.height; 
                       } 
               } 
            } 
       } 
    </script>
求高人解决 我相信csdn高手还是多的,

--------------------编程问答-------------------- 真没看出来。
在火狐里用firebug调试下看看 --------------------编程问答-------------------- 哪个函数出了错? 错误行多少?

你一下贴这么多代码,又不加以说明,别人都懒的看了。 --------------------编程问答-------------------- 把你的代码复制到我的vs里面,没提示缺少啊…… --------------------编程问答-------------------- 不是你贴的这段的错误,查一下除了你贴的外的js --------------------编程问答-------------------- @-@,好花. --------------------编程问答-------------------- 你是不是搞错了?是这段有错? --------------------编程问答-------------------- =.=!代码没错。。。 --------------------编程问答-------------------- 兄弟,我供你的宝地发个贴了,不知道为什么我一开新贴就让我重新登录
<script>
var imgUrl2=new Array();
var imgLink2=new Array();
var imgText2=new Array();
var picNum2=0;
imgUrl2[0]="../images/index_type_img.gif";
imgLink2[0]="products.aspx";
imgUrl2[1]="../images/company_online_img.gif";
imgLink2[1]="newproducts.aspx";
function show2()
{
document.getElementById('companyonline').src=imgUrl2[picNum2]; 
if (picNum2<1) picNum2++; else picNum2=0; 
theTimer2=setTimeout('show2()',4000); 
}
function goUrl2()
{window.open(imgLink2[picNum2],'_blank');
}
</script>
----------------这段代码在IE6,360下都没有问题.为什么到了IE7就显示不了读取的图片呢?
哪位高人指点一下..非常感谢 --------------------编程问答-------------------- DrawImage(this,'200px','200px');
没有引号 --------------------编程问答-------------------- DrawImage(this,200,200);
这样也可以 --------------------编程问答-------------------- 最简单的办法 
把js一个一个删掉 看删掉哪个不出错 然后再一个一个加上
找到后 把有错的那行重新复制 或者重写一遍 --------------------编程问答--------------------  这行报错 郁闷 我一个一个删还是有问题 

<img id="image2" alt="" style="width:200px; height:200px; cursor: hand;" onclick="javascript:openwindow('15d3f97dea63498b9154e7009b9de7aa')" 
--------------------编程问答-------------------- 删了,重新写,别复制,手写 --------------------编程问答-------------------- 学习。。。 --------------------编程问答-------------------- 在火狐看下! --------------------编程问答-------------------- 确实挺晕的。。。
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,