Skip to content

Instantly share code, notes, and snippets.

@flesler
Last active December 19, 2015 08:49
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 flesler/5928649 to your computer and use it in GitHub Desktop.
Save flesler/5928649 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
function encode() {
var v = document.getElementById('t').value;
v = encodeURIComponent(v);
document.getElementById('r').innerHTML = v;
}
</script>
<input type="text" id="t" placeholder="Put your data here..." />
<button onclick="encode()">Encode</button>
<p id="r"></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment