当前位置: 代码迷 >> J2EE >> 送分有关问题,求教,得解即结
  详细解决方案

送分有关问题,求教,得解即结

热度:303   发布时间:2016-04-22 02:38:52.0
送分问题,求教,得解即结
HTML code
<html:select property="jues" value="11">            <html:option value="11">基本查询</html:option>            <html:option value="12">综合查询</html:option>            <html:option value="13">权限管理</html:option>        </html:select>        <a style="cursor: pointer;color:blue"  onclick="window.location='<%=request.getContextPath()%>/Login.do?step=step3&qxadd=?'">授予该权限</a>

 请教下"?"处如何利用js获得select的value值,完整的url该怎么写?

------解决方案--------------------
<html:select id="jues" property="jues" value="11">
<html:option value="11">基本查询</html:option>
<html:option value="12">综合查询</html:option>
<html:option value="13">权限管理</html:option>
</html:select>
 <a style="cursor: pointer;color:blue" onclick="test();">授予该权限</a>
<script>
function test(){
 var jues=$("#jues").val();
 window.location='<%=request.getContextPath()%>/Login.do?step=step3&qxadd='+jues;
}
</script>




------解决方案--------------------
改一下1楼的,注意是styleId不是id。。
JScript code
<html:select [color=#FF0000]styleId="jues"[/color] property="jues" value="11">  <html:option value="11">基本查询</html:option>  <html:option value="12">综合查询</html:option>  <html:option value="13">权限管理</html:option>  </html:select> <a style="cursor: pointer;color:blue" onclick="test();">授予该权限</a><script>function test(){ var jues=document.getElementById("jues").value; window.location='<%=request.getContextPath()%>/Login.do?step=step3&qxadd='+jues;}</script>
  相关解决方案