网站首页 laravel框架
iframe--子窗口操作父窗口
发布时间:2016-07-06 10:39查看次数:3091
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>子窗口操作父窗口</title> </head> <body> <p>子窗口操作父窗口</p> </body> <script src="{{asset('comment/js/jquery.min.js')}}"></script> <script> // var header = parent.document.getElementsByClassName("sbysj-header"); var flag = true; if var add = $('.sbysj-header',parent.document) //这里的对象是父类窗口上的类对象 这里要注意 add.find('p').remove(); var tmpstr = $(' <div style="width: 120px"><div><img src="http://www.gpc-pdc.com/images/default_head.png" style="width:30px;height:30px;" /><p style="width: 80px" ><a href="http://www.gpc-pdc.com/theme/themeUser.html?userId=e2f6021f6fbe446699cd59adceb554c1">德玛西亚</a></p></div></div>'); add.append(tmpstr); </script> </html>
关键字词:子窗口操作父窗口