Layer.Open component gets an instance of the pop-up page variable, function

A recent project encountered a problem

layer.open组件获取弹出层页面变量、函数的实例 components using the popup, pop-layer decimated the city needs a separate public page and therefore need access to relevant variable or function value the popup page in the Home page. Measures under

records resolved.

First look function


Layers URL corresponding to the key code of the page look pop

to form into JS sequence function object is a package JS their function, will not elaborate here, may be to manually define a JS objects, their attributes added to the object


The last view is called home page



The callback function receives the print variables can be seen, the pop-up data acquired user operation layer.

Finally, the key point is that in fact acquired ifream variables or functions specified in this method

  $ (layero) .find ( "iframe") [0] .contentWindow.formData ();  

is completed!

This component gets more layer variables pop-up page, is the instance of the function Xiaobian share the entire contents of everyone, and I hope to give you a reference, I hope you will support Tumi cloud.

© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment