Created
September 11, 2015 01:42
-
-
Save anonymous/49f659e13aeae8062f97 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fomoruqeje
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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