<form class="well form-inline margin-top-20 data-form" name="data_search_from" method="get" action="{:url('AdminLog/index')}">
<input type="submit" class="btn btn-primary" onclick="search()" value="搜索"/>
<a class="btn btn-primary" onclick="exportData()">导出所选条件记录</a>
<a class="btn btn-danger" href="{:url('AdminLog/index')}">清空</a>
</form>
<script>
function search() {
document.data_search_from.action ="{:url('AdminProject/index')}";
document.data_search_from.submit();
}
function exportData() {
var btn =$(this),form =btn.parents('form.data-form');
var text =btn.html();
if(confirm('确认导出吗?时间可能较久,请耐心等待')){
document.data_search_from.action ="{:url('AdminProject/export')}";
document.data_search_from.submit();
}
return false;
}
</script>