You are here: Re: numeric checker « HTML « IT news, forums, messages
Re: numeric checker

Posted by Toby Inkster on 01/09/07 09:26

Tom wrote:

> document.write("<body bgcolor=\"44eedd\">");
> document.write("<body text=\"000000\">");
> document.write("<B><font size=3 face='arial'>")

What in the name of sweet Jesus is that?!

You're trying to output not one but two *extra* BODY elements. An HTML
document must contain precisely *one* BODY element. The FONT element is
deprecated too, though that's the least of your worries.

Better:

<script type="text/javascript">
var ok = "This chip will work";
var nook = "This chip will not work";

function check_input()
{
var entry = document.forms.f.textfield.value;
window.alert(empty.match(/\d{15}/) ? ok : nook);
}
</script>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация