首页javascripthiddenjQuery Form - 如何句柄按钮点击事件...

jQuery Form - 如何句柄按钮点击事件...

我们想知道如何句柄按钮点击事件。...

<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
  <input type="hidden" id="theid1" value="11" />
  <input type="hidden" id="theid2" value="22" />
  <input type="hidden" id="theid3" value="33" />
  <script>
$('input[id^="theid"]').each(function () {
   console.log($(this).val());
});
</script>
</body>
</html>