Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="looping through each child input boxes" />
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <input class="my" type="text" value="a" />
  <input class="my" type="text" value="b" />
  <input class="my" type="text" value="c" />
  <input class="my" type="text" value="d" />
  <input class="my" type="text" value="e" />
  
  <button onclick="show()">Click me</button>
</body>
</html>
<script>
  function show(){
    $(".my").each(function() {
     var val = $(this).val();
     alert(val);
  });
  }
</script>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
prashantghimirepro
0viewers