phoenixg 发表于 2011-8-10 14:12:38

着急,有关下拉框跳转页面的问题

本帖最后由 phoenixg 于 2011-8-10 14:14 编辑

视图里面有一个下拉框:

<select name="type_article" id="type_article">      
<option value="1">news</option>      
<option value="2">testimonies</option>
</select>

视图的地址是:http://localhost/ci_volunteers/index.php/cult/show/1

我希望
http://localhost/ci_volunteers/index.php/cult/show/1/1-> 下拉框里选择news时,页面URI变成如左显示
http://localhost/ci_volunteers/index.php/cult/show/1/2 -> 下拉框里选择testimonies时,页面URI变成如左显示
依次类推

下拉框选择一个项目时,页面直接在当前页跳转,无需点击按钮提交

请教思路或写法!



jeongee 发表于 2011-8-10 14:19:12

<select onchange="location='<?php echo site_url('cult/show'); ?>/'+this.value;">

phoenixg 发表于 2011-8-10 14:38:04

jeongee 发表于 2011-8-10 14:19 static/image/common/back.gif


这来是这样写,Thank you!
页: [1]
查看完整版本: 着急,有关下拉框跳转页面的问题