Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report