██▓▓▒▒░░ ɔɔ˙ǝɹ0ɔ˙ʍʍʍ ░░▒▒▓▓█

Flip text – Como escribir texto de cabeza ( codigo fuente en JavaScript )

by on Jul.14, 2009, under JavaScript

En esta ocacion les dejo una forma facil de escribir un texto y ponerlo de cabeza. Esto lo pongo a peticion de varios de los visitantes que me lo solicitaron, disfrutenlo :p

Descargar: text-flip.html

Flip Text – source code
===================


<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <title>Text Flip
 </title>
<style type="text/css">
 textarea
 {
  font-family:  "Arial Unicode MS", Batang;
  color:   orange;
  background:  #000;
 }
 body
 {
  color:    #0f0;
  font-family:  tahoma;
  font-size:  10pt;
  background:  #000;
 }
</style>
<script language="JavaScript">

function flipOriginalText()
{
 var strFlipped = flipString(document.flipForm.txtOriginal.value.toLowerCase());
 document.flipForm.txtFlipped.value = strFlipped;
}

function flipString(strText)
{
 var lastPosition = strText.length - 1;
 var strArray = new Array(strText.length)
 for (var i = lastPosition; i >= 0; --i)
 {
  var c = strText.charAt(i)
  var r = flipTable[c]
  strArray[lastPosition - i] = r!=undefined ? r : c
 }
 return strArray.join('')
}

var flipTable =
{
 a : 'u0250',
 b : 'q',
 c : 'u0254', //open o -- from pne
 d : 'p',
 e : 'u01DD',
 f : 'u025F', //from pne
 g : 'u0183',
 h : 'u0265',
 i : 'u0131', //from pne
 j : 'u027E',
 k : 'u029E',
 //l : 'u0283',
 m : 'u026F',
 n : 'u',
 r : 'u0279',
 t : 'u0287',
 v : 'u028C',
 w : 'u028D',
 y : 'u028E',
 '.' : 'u02D9',
 '[' : ']',
 '(' : ')',
 '{' : '}',
 '?' : 'u00BF', //from pne
 '!' : 'u00A1',
 "'" : ',',
 '<' : '>',
 '_' : 'u203E',
 ';' : 'u061B',
 'u203F' : 'u2040',
 'u2045' : 'u2046',
 'u2234' : 'u2235'
}

for (i in flipTable)
{
  flipTable[flipTable[i]] = i
}
</script></head><body>
<h3>Flip text </h3>
<form name="flipForm">
Texto Original:
<br>
 <input value="Voltear texto" onclick="flipOriginalText()" type="button">
 <br>
 <textarea rows="10" cols="70" name="txtOriginal" onkeyup="flipOriginalText()"></textarea>
<br><br>
Texto volteado:
<br>
 <textarea rows="10" cols="70" name="txtFlipped"></textarea>
</form>
<p style="width: 300px;">
<small>
 Download from - - > <a href="http://www.antoniobs.net">http//www.antoniobs.net</a> <br>
 Original idea - - > <a href="http://pne.livejournal.com/398399.html>http://pne.livejournal.com/398399.html</a></small>
</p>
</body>
</html>

 

4 Comments for this entry

  • Amber Lancaster Interview

    Nearly all of what you mention happens to be supprisingly legitimate and that makes me wonder the reason why I hadn’t looked at this with this light before. This piece really did switch the light on for me personally as far as this specific subject matter goes. However at this time there is actually one particular position I am not necessarily too comfy with so whilst I attempt to reconcile that with the main idea of the issue, allow me see exactly what all the rest of your readers have to say.Very well done.

  • monitor for photography

    Subject material like this ought to be acknowledged by literary committees. I consider you should win an award for how nicely you laid this details on the table and kept it truly engaging. I enjoy your operate.

  • lemonade diet

    Very good article, I learn alot for this post but you make want to check it because it only work on my computer not my iphone.

  • women s silver tab jeans

    Is it possible to inform me how I can add your site in my news reader. your support could be helpful I definitely choose to access your articles.

Leave a Reply

Walcome to this web site! :)

Visit our friends!

A few highly recommended friends...