我有一个表单字段,其中包含供应商页面列表。每个值都是我要向客户发送的确切页面的网址。有些用户只是刷新页面而不是浏览器打开一个新窗口并转到该地址。
<label for="Liners">Liner Tray Sizes: 125 - 18</label>
<form name="jump1">
<select name="Liners">
<option value="#">Choose an Availability Quick Link</option>
<option value="http://www.agristarts.com/index.cfm/fuseaction/plants.availability/index. htm" > Agristarts</option>
<option value="http://www.ag3inc.com/Availability.asp" > AG3</option>
<option value="http://www.arcferns.com/Availability.html" > ARC Ferns</option>
</select>
<button type="submit" class="btn btn-primary" onclick="window.open(Liners.value, 'newtab')">Go</button>
</form>
我检查了有问题的计算机上的浏览器设置,启用了Java脚本,并且我也在网站上列出了白名单。我的代码中有什么东西是错的吗?这在以前版本的网站上工作,所以我只是复制了它。
答案 0 :(得分:1)
我复制到JSFiddle进行测试: https://jsfiddle.net/ok5Lzk20/
xyz
似乎可以在Chrome中使用。哪个浏览器失败了?
我可能使用ID而不是“name”属性,因为这可能不是唯一的。但它应该按原样运作。