Skip to content

Instantly share code, notes, and snippets.

Created September 11, 2015 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/49f659e13aeae8062f97 to your computer and use it in GitHub Desktop.
Save anonymous/49f659e13aeae8062f97 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fomoruqeje
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<form id="form" action="/">
</form>
<script id="jsbin-javascript">
var count = 0;
for (var i = 0; i < 11; i++) {
$('#form').append('<label for="input' + i + '">' + i + '</label><br/><input type="text" name="input' + i + '" id="input' + i + '" value="input' + i + '">');
}
$('input').each(function() {
$('label').each(function() {
count++;
console.log(count);
});
});
</script>
<script id="jsbin-source-javascript" type="text/javascript">var count = 0;
for (var i = 0; i < 11; i++) {
$('#form').append('<label for="input' + i + '">' + i + '</label><br/><input type="text" name="input' + i + '" id="input' + i + '" value="input' + i + '">');
}
$('input').each(function() {
$('label').each(function() {
count++;
console.log(count);
});
});</script></body>
</html>
var count = 0;
for (var i = 0; i < 11; i++) {
$('#form').append('<label for="input' + i + '">' + i + '</label><br/><input type="text" name="input' + i + '" id="input' + i + '" value="input' + i + '">');
}
$('input').each(function() {
$('label').each(function() {
count++;
console.log(count);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment