<script> //js獲取頁面所有搜索條件function GetSearchData(SearchDivID) { var ObjID= SearchDivID? SearchDivID: ".search"; //預設為類樣式.search, <div class="search"> var ...
<script>
//js獲取頁面所有搜索條件
function GetSearchData(SearchDivID) {
var ObjID= SearchDivID? SearchDivID: ".search"; //預設為類樣式.search, <div class="search">
var data = {};
var $SearchObj = $(ObjID);
$SearchObj.children().each(function () {
var name = $(this).attr('name');
if (name) {
var val = $(this).val();
if (val) {
data[name] = val;
}
}
});
return data;
}
function getlist() {
var data = GetSearchData();
$.post("/Controller/View", data,
function (data) {
$("#ID").html(data);
})
}
</script>