Article View: pl.comp.lang.javascript
Article #39462Re: Zmiana wyświetlania " w locie"
From: porneL
Date: Sat, 15 Apr 2006 19:04
Date: Sat, 15 Apr 2006 19:04
22 lines
1601 bytes
1601 bytes
On Sat, 15 Apr 2006 19:33:09 +0100, Jarosław Ziółkowski
<ziolkowski_jaroslaw@o2.pl> wrote:
> Mam formularz a w nim pole o id="ile"
>
> niżej mam wstawioną w pliku funkcję
> function check(){
> var a=document.getElementById("ile").value;
> document.write(a);
> }
> check();
> Chciałbym żeby po wpisaniu innej wartości bez przeładowywania strony
> wyświetlana była jej wartość. Docelowo chcę żeby wyświetlane było tyle
> inputów ile wpisano w polu ile. No ale kombinuję narazie tylko z
> wyświetlaniem zawartości później mam nadzieję, że sobie poradzę.
Nie używaj document.write, najlepiej w ogóle. Pogooglaj o W3C DOM
(createElement, createTextNode, append/removeChild) albo innerHTML.
--
* html {redirect-to: url(http://kurs.browsehappy.pl);}
this.author = new Geek("porneL");
Technical Details
Message-ID:
<op.s72ck6lofux2e6@pornel.net>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailReferences:
<e1re97$hpl$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: porneL <niusy@pornel.net> Newsgroups: pl.comp.lang.javascript Subject: Re: Zmiana wyświetlania " w locie" Date: Sat, 15 Apr 2006 20:04:08 +0100 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 22 Message-ID: <op.s72ck6lofux2e6@pornel.net> References: <e1re97$hpl$1@inews.gazeta.pl> NNTP-Posting-Host: pornel.plus.com Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1145127849 25396 84.92.248.233 (15 Apr 2006 19:04:09 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Sat, 15 Apr 2006 19:04:09 +0000 (UTC) X-User: pornelspam User-Agent: Opera Mail(BETA2)/9.00 (MacPPC) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit