我有一组html select标记,用于完成一组车辆目录的搜索参数。 html如下:
<div class="clearfix select-form padding-bottom-50">
<div class="my-dropdown min-years-dropdown max-dropdown">
<select name="year" class="css-dropdowns" tabindex="1" id="txtYear" runat="server" >
<option value="">Search by Year</option>
<option value="2018">2018</option>
<option value="2017">2017</option>
<option value="2016">2016</option>
<option value="2015">2015</option>
<option value="2014">2014</option>
<option value="2013">2013</option>
<option value="2012">2012</option>
<option value="2011">2011</option>
<option value="2010">2010</option>
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
<option value="2006">2006</option>
<option value="2005">2005</option>
<option value="2004">2004</option>
</select>
</div>
<div class="my-dropdown min-years-dropdown max-dropdown">
<select name="make" class="css-dropdowns" tabindex="1" id="txtMake" runat="server" >
<option value="">Search by Make</option>
<option value="BMW">BMW</option>
<option value="FORD">FORD</option>
</select>
</div>
<div class="my-dropdown min-years-dropdown max-dropdown">
<select name="transmission" class="css-dropdowns" tabindex="1" id="txtTrans" runat="server" >
<option value="">Search by Transmission</option>
<option value="Automatic">Automatic</option>
<option value="Manual">Manual</option>
</select>
</div>
<div class="my-dropdown min-years-dropdown max-dropdown">
<select name="price" class="css-dropdowns" tabindex="1" id="txtPrice" runat="server" >
<option value="">Search by Price</option>
<option value="50000">< R50,000</option>
<option value="100000">< R100,000</option>
<option value="150000">< R150,000</option>
<option value="200000">< R200,000</option>
</select>
</div>
<input type="button" value="Search" class="pull-left btn-inventory margin-bottom-none md-button" runat="server" id="btnSearch" onserverclick="btnSearch_ServerClick1" />
</div>
</div>
<div class="clearfix"></div>
</div>
在隐藏代码上:
protected void btnSearch_ServerClick1(object sender, EventArgs e)
{
Response.Redirect("usedsearch.aspx?make=" + txtMake.Value + "&year=" + txtYear.Value + "&trans=" + txtTrans.Value + "&price=" + txtPrice.Value);
}
在iphone上浏览站点时,选择标签中的值不会传递到URL参数(参数值为空->例如www ..... com?Make =&Year = ...)。 但是,在Android设备上,它可以完美运行。真的很困惑。