我需要通過JavaScript函數執行預定義的Google搜索,該函數由頁面中的按鈕啓動。通過javascript函數預定義google搜索
所以我一直沒有sucess前tryed:
<html>
<head>
<script language="JavaScript">
function googleSearch(quest){
var googlefind = "http://www.google.com/search?hl=en&q=" + quest + " buy Blu-Ray DVD";
window.open(googlefind);
}
</script>
</head>
<body>
<INPUT type="button" value="Buy this Anime Now!" onclick="googleSearch("Fullmetal Alchemist Brotherhood");">
</body>
</html>
是否有人能幫助我嗎?
問題,費爾南多,是你的雙引號http://jsfiddle.net/ZLQ3P/ –
真棒,你做到了!謝謝你的幫助! –