window.location.href携带JSON到jsp页面,和select下拉框对接
来源:互联网 发布:淘宝最新爆款方法 编辑:程序博客网 时间:2024/04/29 08:00
window.location.href='../jsp/userManager/addUser.jsp?data='+ encodeURI(encodeURI(data)) + ""; //jsp页面获取data参数<% //获取添加按钮带过来的参数data String data =java.net.URLDecoder.decode(request.getParameter("data"),"utf-8");%> //待页面加载后加载的function$(document).ready(function(){ //获取角色列表 var data ='<%=data%>'; var data2 =JSON.parse(data); var str = ""; var sel = $("#sel"); //和select下拉框对接 for(var i in data2){ str += '<optionvalue="'+data2[i].id+'">'+data2[i].role_name+'</option>'; sel.append(str); str = ""; } //或者 for(var i in data2){ $("#sel").append("<optionvalue='"+data2[i].id+"'>"+data2[i].role_name+"</option>"); })};
阅读全文
0 0
- window.location.href携带JSON到jsp页面,和select下拉框对接
- jsp页面window.location.href的用法
- JSP中window.location.href"、"location.href"、"parent.location.href"、"top.location.href"和"target属性"的用法
- jsp页面传值 window.location.href中文乱码问题解决
- window.location.href页面跳转
- window.location.href刷新页面
- window.location.href和window.location.replace
- window.top.location.href 和 window.location.href 的区别
- window.top.location.href 和 window.location.href 的区别
- window.location.href和window.top.location.href的区别
- window.location.href和window.top.location.href的区别
- 用window.location.href实现页面跳转
- 用window.location.href实现页面跳转
- 用window.location.href实现页面跳转
- 页面跳转重载window.location.href
- window.open() 和 window.location.href
- window.location.href"、"location.href"
- location.href、parent.location.href、top.location.href、 window.open实现页面跳转
- 正则表达式入门
- 最全Java日志框架详解
- 随机排列数组(二)
- linux 定时重启tomcat 服务
- 常用的Git操作
- window.location.href携带JSON到jsp页面,和select下拉框对接
- Phpstorm许可证过期
- NIO(一)--Path的使用
- JVM八:JVM调优总结 -Xms -Xmx -Xmn -Xss
- Android中导出Sqlite数据库文件打开异常database disk image is malformal
- vcxproj
- WPF学习——最大化有阴影的无边框窗体
- linux下zookeeper
- 中间件组