由于页面中包含多document,首先需要定位到只读控件所在的frame,之后的操作如下ie.frame(:id,"frameid")...frame(:id,"frameid").document.parentWindow.execScript(js_script)