【发布时间】:2012-02-24 20:37:36
【问题描述】:
原始网址是http://mysite.com/locations.aspx 当有人单击某处的位置链接并进入此页面时,在页面加载时,我希望将 URl 即时附加如下?医院是页面上的一个复选框,默认需要选中。因此,当他们登陆页面时,他们会看到所有医院,而不必检查医院复选框并重新加载页面。这可以使用 jquery 吗?
http://mysite.com/locations.aspx?k=("医院")
Find locations by <input name="Keyword" type="text" size="70"/><input name="Search" type="submit" value="Search"/><br/><br/>
Hospitals<input name="Hospitals" type="checkbox" value="Hospital"/>  
Offices<input name="Office" type="checkbox" value="Office"/>  
Emergency Centers<input name="EmergencyCenters" type="checkbox" value="Emergency"/> 
Out-Patient Centers<input name="Out-Patient" type="checkbox" value="Out-Patient"/> 
Facilities<input name="Facility" type="checkbox" value="Facility"/>
【问题讨论】:
-
我知道我可以将“Locations”链接的 HREF 值设为mysite.com/locations.aspx?k=("Hospital") 并检查医院 = true.. 不知道还有没有其他方法?
标签: jquery url checkbox query-string checked