Created
April 6, 2013 05:17
-
-
Save tedshd/5324935 to your computer and use it in GitHub Desktop.
Get length limit test
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Get</title> | |
</head> | |
<body> | |
<?pdp | |
echo 'Get' . htmlspecialchars($_GET['get_length']); | |
?> | |
</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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>php get test</title> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("button").on("click", function(e) { | |
var length = $("#num").val(); | |
// alert($("#num").val()); | |
var getSum = "1"; | |
for (var i = 1; length>= i; i++) { | |
var n = "1"; | |
getSum = n + getSum; | |
}; | |
$("#get").attr("value", getSum); | |
$("#length").append(getSum.length); | |
}) | |
}); | |
</script> | |
</head> | |
<body> | |
Input length: <input type="text" id="num"> | |
<button>Check</button> | |
<form id="form" action="get.php" method="get"> | |
Get: <input type="text" name="get_length" id="get" value="get_value_length"> | |
<input type="submit"> | |
</form> | |
<div id="length">Get string length: </div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment