日期:2014-05-17  浏览次数:21252 次

程序有一个函数参数的问题,不知道该怎么办请帮忙看看八,谢谢!

response.write   " <tr   bgcolor= "&bgclr& "   style= 'cursor:hand; '   onmouseover=this.style.backgroundColor= 'lightblue '   onmouseout=this.style.backgroundColor= ' '   onclick= 'doit(11,22) '> "    


上面这样写程序正常,能取出参数的值


response.write   " <tr   bgcolor= "&bgclr& "   style= 'cursor:hand; '   onmouseover=this.style.backgroundColor= 'lightblue '   onmouseout=this.style.backgroundColor= ' '   onclick= 'doit(aa,bb) '> "    


上面这样写报错   'aa '未定义


response.write   " <tr   bgcolor= "&bgclr& "   style= 'cursor:hand; '   onmouseover=this.style.backgroundColor= 'lightblue '   onmouseout=this.style.backgroundColor= ' '   onclick= 'doit( 'aa ', 'bb ') '> "      


上面这样写不报错   但也没有功能


response.write   " <tr   bgcolor= "&bgclr& "   style= 'cursor:hand; '   onmouseover=this.style.backgroundColor= 'lightblue '   onmouseout=this.style.backgroundColor= ' '   onclick= 'doit( "aa ", "bb ") '> "  


上面这样写报错
Microsoft   VBScript   编译器错误   错误   '800a0401 '  

语句未结束  

/ehongjimeng/yixiangkehuluru.asp,行173  

response.write   " <tr   bgcolor= "&bgclr& "   style= 'cursor:hand; '   onmouseover=this.style.backgroundColor= 'lightblue '   onmouseout=this.style.backgroundColor= ' '   onclick= 'doit( "aa ", "bb ") '> "
----------------------------------------------------------------------------------------------^
错误指向aa中的第一个a


下面是配套的doit()函数,好象和它联系不大
function   doit(yxs1,yxs2)
{

    document.form2.textfield2.value   =   yxs1;
    document.form2.textfield3.value   =   yxs2;
 
}
谢谢,该怎么办啊?

------解决方案--------------------
response.write " <tr bgcolor= "&bgclr& " style= 'cursor:hand; ' onmouseover=this.style.backgroundColor= 'lightblue ' onmouseout=this.style.backgroundColor= ' ' onclick= 'doit( " "aa " ", " "bb " ") '> "
试试这个。