简体   繁体   English

如何查看表天气是否已满?

[英]How to check table weather is has been filled or not?

I have one html page which gets generated as a result of clicking of search button on the page. 我有一个HTML页面,该页面是通过单击页面上的搜索按钮生成的。 Which fetches the records from mySQL and populate the table but after that it has one plot which uses the search parameter as input and plot the graph using highcharts. 它从mySQL中获取记录并填充表,但之后有一个图,该图使用搜索参数作为输入,并使用highcharts绘制图。

Structure of page: 页面结构:

<html>
<head>
<script>
    <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
    <script>
    $(document).ready(function(){
      $("#plotgenerator").click(function(e){
        $.ajax();
    });
    </script>

</script>
</head>
<body>
       <input type=TEXT value="" name="text">
       <input type=SUBMIT value="search" name="search">
       <table></table>
       <input type=SUBMIT value="Submit" name="plotgenerator">  /*click button and fetch records using Ajax and generate a plot here.*/
     <div id ="someplot"></div>
</body>
</html>

Once table gets populatated button plotgenerator should be clicked and plot should be generate here. 表格填充后,应单击按钮plotgenerator,并在此处生成图。 How to check the table has already been filled and completed? 如何检查表格是否已经填写完毕?

Your code checks the table before the search. 您的代码在搜索之前检查表。 Your $(document).ready runs in the moment the user opens the page. 用户打开页面后,您的$(document).ready将运行。 If you use ' $(document).on it may checks the table after the search, when the results are there. 如果您使用' $(document).on则可能会在搜索后检查表是否存在结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM