Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
单击按钮时显示表-jQuery/JavaScript_Javascript_Jquery_Html - Fatal编程技术网

单击按钮时显示表-jQuery/JavaScript

单击按钮时显示表-jQuery/JavaScript,javascript,jquery,html,Javascript,Jquery,Html,请告知如何实现在页面加载时隐藏html内部表格并单击搜索按钮,表格将仅显示结果。我不想把空桌子给你看。请看下面的代码,我已经试过了 当然,点击按钮后,页面会得到刷新 $(文档).ready(函数(){ $(“#历史列表”).hide(); $(“#历史搜索”)。单击(函数(){ $(“#历史列表”).show(); }); // } }); 发布号 校长1 校长2 校长3 校长4 校长5 JavaScript: 函数提交(){ document.menu.cmd.value='sea

请告知如何实现在页面加载时隐藏html内部表格并单击搜索按钮,表格将仅显示结果。我不想把空桌子给你看。请看下面的代码,我已经试过了

当然,点击按钮后,页面会得到刷新

$(文档).ready(函数(){
$(“#历史列表”).hide();
$(“#历史搜索”)。单击(函数(){
$(“#历史列表”).show();
});
// }
});    
发布号


校长1 校长2 校长3 校长4 校长5
JavaScript:

函数提交(){
document.menu.cmd.value='search';
document.menu.submit();
}

单击按钮时,它会显示表格,并再次隐藏表格

$(文档).ready(函数(){
$(“#历史列表”).hide();
$(“#历史搜索”)。单击(函数(e){
e、 预防默认值();
$(“#历史列表”).show();
commit();//从onClick属性}移动);
});


单击按钮时,它会显示表格,并再次隐藏表格$(文档).ready(函数(){$(“#historylist”).hide();$(“#historysearch”).click(函数(e){e.preventDefault();$(“#historylist”).show();commit();//从onClick属性}移动);
$("#historysearch").click(function(e) {
    e.preventDefault();
    $("#historylist").show();
    commit(); // moved from the onClick attribute
});