parent
735f920e9d
commit
473a44d11a
@ -0,0 +1,42 @@
|
||||
<script type="text/javascript">
|
||||
function get_school(value){
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
url :'/school/get_schoollist/'+encodeURIComponent(value),
|
||||
data :'text',
|
||||
success: function(data){
|
||||
$("#schoollist").html(data);
|
||||
|
||||
//$("#schoollist").html(data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function test(id){
|
||||
location.href = "welcome/index?course.trustie.net&school_id="+id;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<div>
|
||||
<p>
|
||||
<a href="welcome/index?course.trustie.net&school_id=0">全部学校</a>
|
||||
</p>
|
||||
<p>
|
||||
请选择省份:<%= select_tag "province",
|
||||
options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province),
|
||||
:onclick => "get_school(this.value)" %>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<ul id="schoollist" style="line-height: 25px">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue