<script>
function searchperson(style)
{<%String mysql="select * from user_info where style='"+request.getParameter("style") +"'" %> }
function searchperson(style)
{<%String mysql="select * from user_info where style='"+request.getParameter("style") +"'" %> }
也能打印出mysql值;但是mysql应该做这样的修改:
mysql="select * from user_info where style='+style+'";
虽然这样修改后style参数是可以传进来,但是执行数据库查询时,一条符合要求的记录也没有,需要在style加上双引号;
即:mysql="select * from user_info where style='"+style+"'";
但是这样修改之后,style又得不到传进来的参数;
不知道怎样解决;
谢谢