- Fórum WMO
- → uiLhian's Content
uiLhian's Content
There have been 4 items by uiLhian (Search limited from 29/04/2023)
Ordernar por
Order
#918256 "replace"
Posted by uiLhian on 10/06/2008, 08:57 in Javascript / DOM / AJAX / ECMAScript
testei num deu certo não, mesmo usando essa função que vc me explicou ae...
#917474 "replace"
Posted by uiLhian on 05/06/2008, 10:44 in Javascript / DOM / AJAX / ECMAScript
Bom eu tenho esse código abaixo:
Gostaria de saber como faço pra quando eu clicar no botão ou link ('qual dos dois for mais facil') ele execultar a variavel 'txt' converter o texto contido na textarea.
Se for possivel, ou mais facil, tipo conforme eu for digitando ele ir convertendo o texto já...
desde já obrigado!
<script language="text/JavaScript"> var txt=document.getElementsByTagName('textarea')[0]; txt.value=txt.value.replace(/a/gi,"α"); txt.value=txt.value.replace(/b/gi,"в"); txt.value=txt.value.replace(/e/gi,"Ñâ€"); txt.value=txt.value.replace(/f/gi,"Æ’"); void(0); </script>
Gostaria de saber como faço pra quando eu clicar no botão ou link ('qual dos dois for mais facil') ele execultar a variavel 'txt' converter o texto contido na textarea.
Se for possivel, ou mais facil, tipo conforme eu for digitando ele ir convertendo o texto já...
desde já obrigado!
#917523 "replace"
Posted by uiLhian on 05/06/2008, 14:22 in Javascript / DOM / AJAX / ECMAScript
tipo leio nessa area, tipo agora é só criar um <a href="" onclick="checar();">teste</a> ? e ele converte ?
me desculpe se naum entedi direito@
me desculpe se naum entedi direito@
#918272 "replace"
Posted by uiLhian on 10/06/2008, 11:12 in Javascript / DOM / AJAX / ECMAScript
<html> <head> <script language="text/JavaScript"> function checar() { var txt=document.getElementsByTagName('textarea')[0]; txt.value=txt.value.replace(/a/gi,"α"); txt.value=txt.value.replace(/b/gi,"в"); txt.value=txt.value.replace(/e/gi,"Ñâ€"); txt.value=txt.value.replace(/f/gi,"Æ’"); void(0); } </script> </head> <body> <form> <textarea name="texto" onKeyUp="java script:checar();"></textarea> </form> <a href="#" onclick="java script:checar();">Teste</a> </body> </html>
tipo e onde ta "java script" ja tentei com ele junto tbm! e nada.
- Fórum WMO
- → uiLhian's Content
- Privacy Policy
- Regras ·