我正在将 html/javascript 添加到 shopify 上的 shogun 应用程序。我从 youtube 视频中复制了这个,因为 shogun 不提供此功能。我不是编码员,只是涉足它。它说缺少分号,但我找不到。
它应该是一个直接进入网站的下拉菜单。你能帮我吗。查看代码
<!doctype html>
<html lang="en">
<head>
<title>Choose your current brand</title>
</head>
<body>
<h1> this is where the header 1 tag goes</h1>
<form name="competitor brands">
<select name="Brand" id="Brand">
<option value="nothing" seleted="selected">Select a Brand </option>
<option value="https://www.goodhousekeeping.com/life/pets/g4531/cutest-dog-breeds/">Active Wow</option>
<option value="https://www.goodhousekeeping.com/life/pets/g4531/cutest-dog-breeds/">Brand 2</option>
<option value="https://www.goodhousekeeping.com/life/pets/g4531/cutest-dog-breeds/">Brand 3</option>
<option value="https://www.goodhousekeeping.com/life/pets/g4531/cutest-dog-breeds/">Brand 4</option>
<option value="https://www.goodhousekeeping.com/life/pets/g4531/cutest-dog-breeds/">Brand 5</option>
</select>
</form>
<script type="text/javascript">
var urlMenu = document.getElementById ('Brand');
urlMenu.onchange = function() {
var userOption = this.options[this.selectedIndex];
if (userOption.value !=-"nothing") {
windwow.open (userOption.value, "Competitor Brand Ingredients","");
}
}
</script>
</body>
</html>