1 2 3 4

查询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变量不该被引号包围

//这样会在当前类型名下进行查询

 

posted @ 2016-06-28 17:05  一缕清风丶  阅读(85)  评论(0编辑  收藏  举报