2
我想點擊一個錨點,但它顯示類型錯誤..不是函數。點擊不起作用的錨點
這裏是我的代碼:
file_browser_callback: function(field_name, url, type, win) {
win.document.getElementById("media").onclick();
win.document.getElementById(field_name).value = 'window.send_to_editor';
},
爲什麼我這樣做
我使用TinyMCE的編輯器,我想用file_browser_callback
。
還有就是我的文檔中打開一個ThickBox的,並選擇在粗框圖像後,將其發送回調send_to_editor
錨#media
,
所以我想從send_to_editor
價值,並設置爲
win.document.getElementById(field_name).value
現在我收到此錯誤:
TypeError: win.document.getElementById(...).onclick is not a function
請不要認爲jQuery代碼,我需要純JavaScript( TinyMCE的初始化不支持的jQuery)