Get the App
SLTechnology News&Howtos  ›  Development  › 

The method of transferring values from Layer pop-up layer to parent page in jQuery

Shulou Source: shulou.com Published: 2022-06-01 02:44:04 09月22日 Update

In this article Xiaobian for you to introduce in detail the "jQuery to achieve Layer pop-up layer to the parent page of the method", detailed content, clear steps, details handled properly, I hope that this "jQuery to achieve Layer pop-up layer to the parent page of the method" article can help you solve doubts, the following editor's ideas slowly in-depth, together to learn new knowledge bar.

Effect picture:

$(document) .ready (function () {/ / add task pop-up layer addTask ();}) / / pop-up layer function addTask () {$('[data-id= "addList"]'). On ('click', function () {layer.open ({type: 2 title:' add Task', closeBtn:1,//maxmin: true,shadeClose: false, / / Click the mask to close the layer area: ['15%','28%'], / / layer width and height content: 'jsp/taskconf/roundConf-addList.jsp'});}); / close layerClose () AddTeam ("addTeam"); addTeam ("addRule") } / / Click the OK button, pass the value to the parent page first, and then close the bullet layer function layerClose () {('[data-id= "saveBtn"]') .click (function () {/ / Click the OK button to get the bullet layer input value, and pass it to the parent page var parentId=parent. ('[data-id= "saveBtn"]) .click (function () {/ / Click the OK button to get the shell layer input value, and pass it to the parent page var parentId=parent. ("# leftTree_1_ul") / / the parent page that receives the value IDvar txt = $('[data-id= "team-txt"]'). Val (); / / get the outgoing value within the pop-up layer var str = "" + "" + txt+ "" + "; parentId.append (str); / / pass the value to the parent page / / first get the index var index = parent.layer.getFrameIndex (window.name) of the current iframe layer; parent.layer.close (index) / / then execute the shutdown});} read here, this article "how to transfer values to the parent page in the Layer pop-up layer in jQuery" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, welcome to follow the industry information channel.

Tags: Pages methods realistic buttons articles tasks content input appropriateness ideas effects effect drawings new knowledge more steps knowledge knowledge points articles indexes details Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB Shulou Technology Apple Microsoft