You are here: Re: Can html perform interactively or make decisions? « HTML « IT news, forums, messages
Re: Can html perform interactively or make decisions?

Posted by David Graham on 02/27/06 12:41

"Toby Inkster" <usenet200602@tobyinkster.co.uk> wrote in message
news:porad3-809.ln1@ophelia.g5n.co.uk...
> senhortomas wrote:
>
> > Can html perform interactively or make decisions?
>
> No -- you'd need either a server-side or client-side programming language.
>
> ECMAScript (a.k.a. Javascript) is really the only client-side scripting
> language in town. Here's an example of something you could do with it:
>
> <script type="text/javascript">
> function sum ()
> {
> var A = document.getElementById('a');
> var B = document.getElementById('b');
> var C = document.getElementById('c');
> C.value = A.value + B.value;
> }
> </script>
> <div>
> <input id="a"> +
> <input id="b">
> <input type="button" onclick="sum();" value="=">
> <input id="c">
> </div>
>
Hi Toby
I just ran the javascript you posted to see it work. When I put in 4 + 3 I
get an answer of 43 - is that what you intended?
bye
David

 

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

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