<div class="panel-body">
<p><strong> 1、您的年龄:</strong></p>
<label class="radio-inline">
<input type="radio" name="basic_age" value="2" checked> 25岁以下
</label>
<label class="radio-inline">
<input type="radio" name="basic_age" value="3"> 25~35岁
</label>
<label class="radio-inline">
<input type="radio" name="basic_age" value="5"> 35~45岁
</label>
<label class="radio-inline">
<input type="radio" name="basic_age" value="4"> 45~60岁
</label>
<label class="radio-inline">
<input type="radio" name="basic_age" value="1"> 60岁以上
</label>
<br><br>
<p><strong> 2、您的就业状况:</strong></p>
<label class="radio-inline">
<input type="radio" name="basic_occupation" value="5" checked> 公务员
</label>
<label class="radio-inline">
<input type="radio" name="basic_occupation" value="3"> 上班族
</label>
<label class="radio-inline">
<input type="radio" name="basic_occupation" value="4"> 佣金收入者
</label>
<label class="radio-inline">
<input type="radio" name="basic_occupation" value="2"> 自营事业者
</label>
<label class="radio-inline">
<input type="radio" name="basic_occupation" value="1"> 无工作
</label>
<br><br>
<p><strong> 3、家庭状况:</strong></p>
<label class="radio-inline">
<input type="radio" name="basic_family" value="2" checked> 未婚
</label>
<label class="radio-inline">
<input type="radio" name="basic_family" value="5"> 双薪无子女
</label>
<label class="radio-inline">
<input type="radio" name="basic_family" value="4"> 双薪有子女
</label>
<label class="radio-inline">
<input type="radio" name="basic_family" value="3"> 单薪有子女
</label>
<label class="radio-inline">
<input type="radio" name="basic_family" value="1"> 单薪养三代
</label>
<br><br>
<p><strong> 4、您的投资经验:</strong></p>
<label class="radio-inline">
<input type="radio" name="basic_invest_year" value="5" checked> 10年以上
</label>
<label class="radio-inline">
<input type="radio" name="basic_invest_year" value="4"> 6-10年
</label>
<label class="radio-inline">
<input type="radio" name="basic_invest_year" value="3"> 2-5年
</label>
<label class="radio-inline">
<input type="radio" name="basic_invest_year" value="2"> 2年以内
</label>
<label class="radio-inline">
<input type="radio" name="basic_invest_year" value="1"> 无
</label>
<br><br>
<p><strong> 5、房产信息:</strong></p>
<label class="radio-inline">
<input type="radio" name="basic_house" value="5" checked> 投资不动产
</label>
<label class="radio-inline">
<input type="radio" name="basic_house" value="4"> 自宅无房贷
</label>
<label class="radio-inline">
<input type="radio" name="basic_house" value="3"> 房贷<50%
</label>
<label class="radio-inline">
<input type="radio" name="basic_house" value="2"> 房贷>=50%
</label>
<label class="radio-inline">
<input type="radio" name="basic_house" value="1"> 无房
</label>
<br>
{# 使用onclick来绑定点击事件 #}
<button id="submit_btn" class="btn btn-info" type="button" onclick="test_navi()">提交选项</button>
<br />
<div id = ‘message‘></div>
<br />
</div>
{#获取表单的值#}
<script>
function test_navi(){
//获取用户选择的单选数据
var age = $("input[name=‘basic_age‘]:checked").val();
var occupation = $("input[name=‘basic_occupation‘]:checked").val();
var family = $("input[name=‘basic_family‘]:checked").val();
var year = $("input[name=‘basic_invest_year‘]:checked").val();
var house = $("input[name=‘basic_house‘]:checked").val();
//发送ajax请求
$.getJSON(‘/detail/navigation_json/‘+age+‘/‘+occupation+‘/‘+family+‘/‘+year+‘/‘+house,function(msg){
//把返回的信息动态地添加到网页中,使用id选择器
$(‘#message‘).html(‘您的投资类型为‘+msg.res);
});
}
</script>