0
這裏是我的代碼。 我也想知道爲什麼我的搜索只需要一個字。例如,如果我輸入「藍色的天空」,它只會用藍色。如何動態更改我的iframe在document.write中的大小
</script>
document.write("<iframe src=\http://www.bing.com/search?q=" + decodeURIComponent(search) + "\" width=\"100\%\" height=\"500\">");
document.write("</iframe>");
</script>
爲乘法的話檢查解碼URI組件的功能,看起來這是行不通的正確http://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20 – dmi3y
所以你想動態改變iframe的高度取決於搜索內容? – dmi3y
是的,我想根據搜索內容更改iframe –