首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

请教变量yxs1和yxs2在取出数据表中是数字则就正确,如表中值是字符则报错未定义,请教是怎么处理啊多谢

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

请问变量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

热点排行