ResultSet rs1=inBean.ExeQuery("select * from sq_user,work_flow where sq_user.work_name=work_flow.work_name and sq_name=""+sq_name+""");
if(rs1.next()){
……
}
如果還是不行~
我覺得你在jsp介面用java ,怎麼也要用<%%>吧?
<script type="text/javascript">
function test(){
<%
String sq_name=request.getParameter("sq_name");
%>
document.getElementById("a").style.display="none";
document.getElementById("b").style.display="none";
document.getElementById("c").style.display="none";
document.getElementById("d").style.display="none";
document.getElementById("e").style.display="none";
var order=rs1.getString("work_order"); //work_order裡的值為a到e,與div的id相對應。
document.getElementById(order).style.display="block";
<% } %>
</script>
ResultSet rs1=inBean.ExeQuery("select * from sq_user,work_flow where sq_user.work_name=work_flow.work_name and sq_name=""+sq_name+""");
if(rs1.next()){
……
}
如果還是不行~
我覺得你在jsp介面用java ,怎麼也要用<%%>吧?
<script type="text/javascript">
function test(){
<%
String sq_name=request.getParameter("sq_name");
ResultSet rs1=inBean.ExeQuery("select * from sq_user,work_flow where sq_user.work_name=work_flow.work_name and sq_name=""+sq_name+""");
if(rs1.next()){
%>
document.getElementById("a").style.display="none";
document.getElementById("b").style.display="none";
document.getElementById("c").style.display="none";
document.getElementById("d").style.display="none";
document.getElementById("e").style.display="none";
var order=rs1.getString("work_order"); //work_order裡的值為a到e,與div的id相對應。
document.getElementById(order).style.display="block";
<% } %>
</script>