我想单击图像并重定向到具有子域 $platform 和过滤器 $search_filter 的 url。这就是我到目前为止所拥有的。请帮忙?
<head>
<script>
function search_platform() {
var $platform=document.getElementById("search_platform").value;
var $search_filter=document.getElementById("search_filter").value;
if ($platform !== '0') {
document.location.href='http://www.' + $platform + 'domain.com/index.php?filter_name=' + $search_filter;
}
}
</script>
</head>
<body>
<select id="search_platform">
<option value="0" selected="selected"><?php echo 'Select Platform'; ?></option>
<option value="platform1">Platform 1</option>
<option value="platform1">Platform 1</option>
<option value="platform1">Platform 1</option>
</select>
<input type="text" name="filter_name"/>
<img src="test.png" width="264" height="110" onclick="search_platform()"/>
</body>