|
Post by Reverse Blade on Apr 20, 2008 21:53:04 GMT -5
<script> <!--
function backtalk(a,b){ for (t=a.length-1;t>=0;t--) { if(b=='1') { document.write(a.charAt(t)); } else if(b=='2') { document.write(a.charAt(t).toLowerCase()); } else if(b=='3') { document.write(a.charAt(t).toUpperCase()); } } } backtalk('Hello wA!','1'); //--> </script>
Turns the text backwards, b is if you want it all upper cases, lower cases, or nothing.
None = 1 Lower = 2 Upper = 3
|
|
|
Post by Schubaltz on Apr 20, 2008 22:38:28 GMT -5
Is this supposed to only return the last character?
|
|
|
Post by Reverse Blade on Apr 20, 2008 23:05:06 GMT -5
What?
It takes the word or whatever and puts it backwords.
|
|
|
Post by Schubaltz on Apr 20, 2008 23:13:42 GMT -5
I just tried it in IE, FF, Opera, and my brain. It doesn't work out that way.
|
|
|
Post by Reverse Blade on Apr 20, 2008 23:52:28 GMT -5
Try now
|
|
|
Post by Schubaltz on Apr 21, 2008 0:03:07 GMT -5
Fine by me (just throw [JS] in the title).
|
|
|
Post by Reverse Blade on Apr 21, 2008 17:36:42 GMT -5
Will do.
|
|
Virtuoso
Junior Member
Teh Baby Hax0rz
Posts: 64
|
Post by Virtuoso on Apr 22, 2008 15:40:21 GMT -5
Use a return function, it works better. You never know what a person wants to do with the value.
|
|
|
Post by Schubaltz on Apr 22, 2008 15:50:34 GMT -5
Deja vu
|
|
Virtuoso
Junior Member
Teh Baby Hax0rz
Posts: 64
|
Post by Virtuoso on Apr 22, 2008 17:01:29 GMT -5
Am I missing something?
|
|
|
Post by Reverse Blade on Apr 22, 2008 17:04:12 GMT -5
Tried it and didn't work
|
|
Virtuoso
Junior Member
Teh Baby Hax0rz
Posts: 64
|
Post by Virtuoso on Apr 22, 2008 17:14:02 GMT -5
function backtalk(a,b){ for (t=a.length-1;t>=0;t--) { if(b=='1') { return a.charAt(t); } else if(b=='2') { return a.charAt(t).toLowerCase(); } else if(b=='3') { return a.charAt(t).toUpperCase(); } } } document.write(backtalk('Hello wA!','1'));
Try that.
|
|