1 A页面跳转时候的地址:2 parent.layer.open({3 type: 2,4 title:'新建草稿',5 shadeClose: true,6 shade: 0.8,7 scrollbar: false,8 maxmin:true,9 area: ['100%', '100%'],10 content:'../../backstage/html/taskManagement/workFlowDefine/newFlowDefine.html?modelId=' +data.id,11 });12 编辑页面:打开页面的时候,显示相关信息,并可以进行保存13 getParam();14 functiongetParam() {15 var url = location.search.substring(1);//location.search得到的是?后面的数据: ?modelId='+data.id,substring() 方法用于提取字符串中介于两个指定下标之间的字符;得到的是去掉?的部分16 if (url != null && url != undefined && url != "") { //表示,如果有参数;且不等于空,则进行分割得到data.id;17 modelId = url.split('&')[0].split('=')[1]; //data.id;18 }19 }20 if (modelId != null && modelId != undefined && modelId != "") {21 $.ajax({22 url: '/service/moddel/' + modelId + '/json',//如果前面不调用getParam(),则此处的modelId就是无定义的23 type: 'get',24 dataType: 'json',25 data: {},26 success: function(response, statusText) {27 if (response.code == '0') {28 $('.copyName').val(response.name);29 $('.flag').val(response.key);32 categoryId =response.category;33 $('.category select option').each(function() {34 if ($(this).val() ==response.category) {35 $(this).attr("selected", true);36 }37 });38 form.render('select');39 if (response.description != null && response.description !=undefined) {40 $('.bigDescribe').text(response.description);41 }42 var dataNodes =response.nodes;43 if (dataNodes != nul
a标签跳转后返回原页面 layui_从A页面带参数跳转到B页面;进行解析,并显示数据,进行编辑...
最新推荐文章于 2022-10-19 15:33:06 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)