查询BUG
index.html网页部分:
<script type="text/javascript">
$(document).ready(function(){
$('#btnSearch').click(function() {
var url = "{:U('/Home/Project/index?typeid='.$typeid)}";
url = url.substring(0, url.length - 5);
url = url + "/projectName/"+$('#projectName').val()+".html";
//alert(url);
location.href = url;
});
$('#BtnSearch').click(function() {
var url = "{:U('/Home/Project/import')}";
location.href = url;
});
});
</script>
//后台给模版赋值 $this -> assign('typeid', $typeid)
//前台通过URL传参,获取后台传值(var url = "{:U('/Home/Project/index?typeid='.$typeid)}";) 这个小数点很重要 .$typeid变量不该被引号包围
//这样会在当前类型名下进行查询
当能力支撑不了野心时,就该静下心来学习!