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

请问变量yxs1和yxs2在取出数据表中是数字则就正确,如表中值是字符则报错未定义,请问是怎么办啊?谢谢
请问变量yxs1和yxs2在取出数据表中是数字则就正确,如表中值是字符则报错未定义,请问是怎么办啊?谢谢
如表中值是“张三”,则报错     “张三”未定义

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


function   doit(yxs1,yxs2)
{
    document.form2.textfield2.value   =   yxs1;
    document.form2.textfield3.value   =   yxs2;
  }

}


------解决方案--------------------
去掉response.write,
这相当于写HTML,语句不能写在 <%%> 内,更不能用response.write