Uncaught ReferenceError: cancel is not defined

确认写法没出错后,基本是由于引用js的顺序出啦问题 参考写法html

<!DOCTYPE html>jquery

<html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!--<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>--> <script src="jquery-1.12.4.min.js"></script> </head> <body> <div> <input type="button" onclick="mao()" value="全选"> <table border="1">code

<thead>
       <tr><th>选项</th><th>ip</th><th>端口</th></tr>
      </thead>
      <tbody>
      <tr><td>  <input type="checkbox"> </td><td>1.1.1.1 </td><td>67</td></tr>
      <tr><td>  <input type="checkbox"></td><td>1.1.1.1 </td><td>67</td></tr>
      <tr><td>  <input type="checkbox"></td><td>1.1.1.1 </td><td>67</td></tr>
      </tbody>
  </table>

</div> <script> function mao() {htm

$(":checkbox").prop('checked',true)
 }
 </script>

</body> </html>ip

相关文章
相关标签/搜索