此处下拉框不能收回是因为iframe是新页面,点击事件不能传递到父级页面。我们需要在父级页面监听iframe页面的点击事件,进而操作下拉框的动作:
以下是获取iframe的js:
var iframe = document.getElementById('iframeId');
iframe.contentWindow.addEventListener('click',function (e) {
RF("comboboxId").combobox('hidePanel');
})
此处下拉框不能收回是因为iframe是新页面,点击事件不能传递到父级页面。我们需要在父级页面监听iframe页面的点击事件,进而操作下拉框的动作:
以下是获取iframe的js:
var iframe = document.getElementById('iframeId');
iframe.contentWindow.addEventListener('click',function (e) {
RF("comboboxId").combobox('hidePanel');
})