Created
March 11, 2015 09:56
-
-
Save peerax/d7b62e25312c69a47a3a to your computer and use it in GitHub Desktop.
This file contains hidden or 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="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script src="httpreq.js"></script> | |
<script> | |
function chkTxt(){ | |
var str = $("#txt").val(); | |
var b = str.replace(/[^a-z0-9_-]/gi,''); | |
$("#txt").val(b); | |
} | |
</script> | |
</head> | |
<body> | |
<input id="txt" type="text" onkeyup="chkTxt();" /> | |
<button>Get External Content</button> | |
<button onClick="window.location = 'test2.html'" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment