我想用 Node-Webkit 制作一个网页填表工具
在代码中引用一个iframe 然后执行JQuery 命令
但是发现无法操作iframe
github查了一下 英文不好没看太懂 Window.eval(frame, script)
var gui = require('nw.gui'); //var new_win = gui.Window.get( // window.open('http://ebook.xuanhun521.com') //); var new_win = gui.Window.open('http://www.thinkphp.cn', { position: 'center', width: 901, height: 127, focus: true }); new_win.eval(frame, function(){ document.getElementById('header-search') };) new_win.on('closed', function () { var element = document.createElement('div'); element.appendChild(document.createTextNode('新窗口已经关闭')); document.body.appendChild(element); }); </script> 这样不行的 啊。。。 求教正确的方法!!!