How to call a function with params in Iframe after loading the iframe in the pop-up dynamically created?

爱⌒轻易说出口 提交于 2019-12-11 16:37:06

问题


In my app, I am loading search result. while the user click on the print button I would like to create a pop-up. ( this is ok ) But when I create a pop-up, I would like to load my Iframe in the pop-up. Again I need to call a Iframe function with the parameter which i receiving from parent page, Because I am using underscore template. I would like to call couple of ajax request with api url - (which i getting from parent page as parameter ) and need to create and append the html in to the Iframe - to print (once the template generated html )

I am sorry for big summary, Even if any one gives good approach even apart from this as well appreciated or could any one show me the correct approach.

simply : html page to popup + load iframe + call iframe function with html page params + create html and append in Iframe + print... - please help me in this..

Thanks In advance!


回答1:


You can change the css rules depending on the media used with CSS media types.

For example:

@media print {
  body { font-size: 10pt }
}
@media screen {
  body { font-size: 13px }
}
@media screen, print {
  body { line-height: 1.2 }
}


来源:https://stackoverflow.com/questions/25479871/how-to-call-a-function-with-params-in-iframe-after-loading-the-iframe-in-the-pop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!