[問題] window.open 新視窗關閉工具列等

看板Ajax作者 (劍客唐唐‧光明)時間15年前 (2010/09/07 01:08), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我的網頁是用一個 jumpmenu 將選單選到的網頁呈現在下方的 iframe 內, 然後旁邊又做一個按鈕讓該選單的網頁也可以點開變成新視窗。 不過我用 window.open 卻無法在括號內設定屬性,例如 toolbar 那些的, 設定後該按鈕就會失效,想請問這該怎麼解決? 以下是程式碼 <script type="text/javascript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 if(selObj.selectedIndex !=0){ eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } } function MM_jumpMenuGo(objId,targ,restore){ //v9.0 var selObj = null; with (document) { if (getElementById) selObj = getElementById(objId); if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } } //--> </script> 然後一個 jumpmenu <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('webgis',this,0)"> <option value="">ABCDEFG</option> </select> 旁邊的按紐,我試過改成 window.open(URL, "MyPage", "toolbar=0") 會讓按鈕失效。 <input type="submit" name="go_button" id= "go_button" value="於新視窗檢視" onclick="MM_jumpMenuGo('jumpMenu','window.open()',0)" /> 下面的 iframe <iframe id="webgis" name="webgis" width="100%" height="600" src="URL" scrolling="No" frameborder="0">您的瀏覽器不支援內置框架或目前的設定為不顯示內 置框架。</iframe> 翻遍估狗只碰到一個老外也問過這樣的問題,但是沒有解答,還望高手指導,謝謝。 -- "It's very simple: Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitates lizard, lizard eats paper, paper disproves Spock, Spock vaporizes rock and, as it always has, rock crushes scissors." - Sheldon Cooper @ TBBT -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.64.150.75 ※ 編輯: Clementtang 來自: 61.64.150.75 (09/07 01:10)
文章代碼(AID): #1CXI0bwj (Ajax)
文章代碼(AID): #1CXI0bwj (Ajax)