Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- präsentiert von kostenlose-javascripts.de -->
- <script type='text/javascript'>
- <!--
- function rot_13()
- {
- var keycode = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- var text = document.getElementById('rot13Text').value;
- var textrot = new String();
- for(var i = 0; i < text.length; i++)
- {
- var codechar = text.substring(i, i + 1);
- var pos = keycode.indexOf(codechar.toUpperCase());
- if(pos >= 0)
- {
- pos = (pos + keycode.length / 2) % keycode.length;
- codechar = (codechar == codechar.toUpperCase()) ? keycode.substring(pos, pos + 1) : keycode.substring(pos, pos + 1).toLowerCase();
- }
- textrot = textrot + codechar;
- }
- document.getElementById('rot13Text').value = textrot;
- }
- function initRot13() {
- document.write('<textarea name="rot13Text" id="rot13Text" rows="5" cols="60">Dieser Text kann mittels ROT13 verschlüsselt werden.'); } //-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement