<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ureshino.org &#187; JavaScript</title>
	<atom:link href="http://www.ureshino.org/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ureshino.org</link>
	<description>As escolhas qualificam a liberdade!</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:00:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Validação de email em javascript</title>
		<link>http://www.ureshino.org/validacao-de-email-em-javascript/</link>
		<comments>http://www.ureshino.org/validacao-de-email-em-javascript/#comments</comments>
		<pubDate>Sat, 08 Apr 2006 00:17:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programação]]></category>

		<guid isPermaLink="false">http://www.ureshino.com.br/myblog/archives/18</guid>
		<description><![CDATA[Aqui vai mais um post...Tava precisando de uma validador de email em javascript...aí entrei no phpbrasil, procurei o script e encontrei depois de procurar um pouco... então eu resolvi colocar aqui que fica mais fácil de encontrar... PLAIN TEXT JavaScript: if &#40;!&#40;/^\w+&#40;&#91;\.-&#93;?\w+&#41;*@\w+&#40;&#91;\.-&#93;?\w+&#41;*&#40;\.\w&#123;2,3&#125;&#41;+$/.test&#40;email&#41;&#41;&#41; &#123;&#60;br /&#62; alert&#40;"Email invalido"&#41;;&#60;br /&#62; &#125; e para ver o código rodando acesse [...]]]></description>
			<content:encoded><![CDATA[<p>Aqui vai mais um post...Tava precisando de uma validador de email em javascript...aí entrei no <a title="phpbrasil" href="http://www.phpbrasil.com">phpbrasil</a>, procurei o script e encontrei depois de procurar um pouco... então eu resolvi colocar aqui que fica mais fácil de encontrar...</p>
<p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JavaScript:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #0066FF;">/^\w+<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>\.-<span style="color:#006600; font-weight:bold;">&#93;</span>?\w+<span style="color:#006600; font-weight:bold;">&#41;</span>*@\w+<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>\.-<span style="color:#006600; font-weight:bold;">&#93;</span>?\w+<span style="color:#006600; font-weight:bold;">&#41;</span>*<span style="color:#006600; font-weight:bold;">&#40;</span>\.\w<span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#800000;">2</span>,<span style="color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+$/.<span style="color: #006600;">test</span><span style="color:#006600; font-weight:bold;">&#40;</span>email<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>&lt;br /</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">alert</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"Email invalido"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&lt;br /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>e para ver o código rodando <a title="valida email" href="http://www.ureshino.com.br/besteiras/email.php">acesse</a></p>
<p>Espero ter ajudado!!!</p>
<p>Até mais...</p>
<p>Fui</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Valida%C3%A7%C3%A3o+de+email+em+javascript+http%3A%2F%2Fis.gd%2FShvCel" title="Post to Twitter"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;title=Valida%C3%A7%C3%A3o+de+email+em+javascript" title="Post to Digg"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-big3.png" alt="Post to Digg" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;t=Valida%C3%A7%C3%A3o+de+email+em+javascript" title="Post to Facebook"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.google.com/buzz/post?url=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-big3.png" alt="Post to Google Buzz" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;t=Valida%C3%A7%C3%A3o+de+email+em+javascript" title="Post to MySpace"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/myspace/tt-myspace-big3.png" alt="Post to MySpace" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://reddit.com/submit?url=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;title=Valida%C3%A7%C3%A3o+de+email+em+javascript" title="Post to Reddit"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-big3.png" alt="Post to Reddit" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://slashdot.org/bookmark.pl?url=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;title=Valida%C3%A7%C3%A3o+de+email+em+javascript" title="Post to Slashdot"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/slashdot/tt-slashdot-big3.png" alt="Post to Slashdot" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.ureshino.org/validacao-de-email-em-javascript/&amp;title=Valida%C3%A7%C3%A3o+de+email+em+javascript" title="Post to StumbleUpon"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/su/tt-su-big3.png" alt="Post to StumbleUpon" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.ureshino.org/validacao-de-email-em-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Campos somente numéricos</title>
		<link>http://www.ureshino.org/campos-somente-numericos/</link>
		<comments>http://www.ureshino.org/campos-somente-numericos/#comments</comments>
		<pubDate>Sat, 04 Mar 2006 04:40:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programação]]></category>

		<guid isPermaLink="false">http://www.ureshino.com.br/myblog/archives/12</guid>
		<description><![CDATA[A um tempo atrás, lá no meu trabalho, precisávamos de uma função em JavaScript que não permitisse que o usuário (pior pesadelo de um programador WEB) digitasse caracteres diferentes de números... E o pior... que funcionasse no IEca e no Firefox... Aí tinha acabado de chegar um cara pra nos ajudar na programação e demos [...]]]></description>
			<content:encoded><![CDATA[<p>A um tempo atrás, lá no meu trabalho, precisávamos de uma função em JavaScript que não permitisse que o usuário (pior pesadelo de um programador WEB) digitasse caracteres diferentes de números...</p>
<p>E o pior... que funcionasse no IEca e no Firefox...</p>
<p>Aí tinha acabado de chegar um cara pra nos ajudar na programação e demos a tarefa a ele...</p>
<p>e ele fez direitinho... e a função ficou assim...</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-5');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JavaScript:</span>
<div id="javascript-5">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> numero<span style="color:#006600; font-weight:bold;">&#40;</span>evtKeyPress<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> nTecla = <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>document.<span style="color: #006600;">all</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">nTecla = evtKeyPress.<span style="color: #006600;">keyCode</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">nTecla = evtKeyPress.<span style="color: #006600;">which</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>nTecla&gt; <span style="color:#800000;">47</span> &amp;&amp; nTecla &lt;<span style="color:#800000;">58</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">|| nTecla == <span style="color:#800000;">8</span> || nTecla == <span style="color:#800000;">127</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">|| nTecla == <span style="color:#800000;">0</span> || nTecla == <span style="color:#800000;">9</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">|| nTecla == <span style="color:#800000;">13</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>e agora vamos ver como fica na página html</p>
<div class="igBar"><a href="javascript:showCodeTxt('html-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-6">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">onkeypress</span>=<span style="color: #ff0000;">"return numero(event);"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p><script type="text/javascript">
function numero(evtKeyPress) {
var nTecla = 0;
if (document.all) {
nTecla = evtKeyPress.keyCode;
} else {
nTecla = evtKeyPress.which;
}
if ((nTecla> 47 &amp;&amp; nTecla <58)
|| nTecla == 8 || nTecla == 127
|| nTecla == 0 || nTecla == 9
|| nTecla == 13) {
return true;
} else {
return false;
}
}
</script></p>
<p><a title="campo apenas numerico" href="http://www.ureshino.com.br/besteiras/campo_numerico.php">clique aqui para ver um exemplo de como fica na real...</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Campos+somente+num%C3%A9ricos+http%3A%2F%2Fis.gd%2FUY37lx" title="Post to Twitter"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.ureshino.org/campos-somente-numericos/&amp;title=Campos+somente+num%C3%A9ricos" title="Post to Digg"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-big3.png" alt="Post to Digg" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.ureshino.org/campos-somente-numericos/&amp;t=Campos+somente+num%C3%A9ricos" title="Post to Facebook"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.google.com/buzz/post?url=http://www.ureshino.org/campos-somente-numericos/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-big3.png" alt="Post to Google Buzz" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u=http://www.ureshino.org/campos-somente-numericos/&amp;t=Campos+somente+num%C3%A9ricos" title="Post to MySpace"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/myspace/tt-myspace-big3.png" alt="Post to MySpace" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://reddit.com/submit?url=http://www.ureshino.org/campos-somente-numericos/&amp;title=Campos+somente+num%C3%A9ricos" title="Post to Reddit"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-big3.png" alt="Post to Reddit" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://slashdot.org/bookmark.pl?url=http://www.ureshino.org/campos-somente-numericos/&amp;title=Campos+somente+num%C3%A9ricos" title="Post to Slashdot"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/slashdot/tt-slashdot-big3.png" alt="Post to Slashdot" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.ureshino.org/campos-somente-numericos/&amp;title=Campos+somente+num%C3%A9ricos" title="Post to StumbleUpon"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/su/tt-su-big3.png" alt="Post to StumbleUpon" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.ureshino.org/campos-somente-numericos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

