🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #39536

Re: Co znaczy ten bład

#39536
From: porneL
Date: Thu, 20 Apr 2006 11:19
23 lines
1445 bytes
On Thu, 20 Apr 2006 10:21:00 +0100, Dariusz Rogalski  
<d.rogalski@spamerzy.wynocha.ksiaznica.szczecin.pl> wrote:

> ale znalazlem alternatywna, chyba bardziej spojna i logiczna metode na
> osiagniecie celu
>
> 	function clearChildren()
> 	{
> 		var theObj = document.getElementById('listaSekcji');
> 		while(theObj.hasChildNodes() == true)
> 		{
> 				theObj.removeChild(theObj.childNodes[0]);
> 		}
> 	}

To mi się wydaje krótsze, prostsze, może ciut szybsze i bardziej  
kulodporne:

while(obj.lastChild) obj.removeChild(obj.lastChild);

-- 
* html {redirect-to: url(http://kurs.browsehappy.pl);}
this.author = new Geek("porneL");
Technical Details
Message-ID: <op.s8a0e9pofux2e6@pornel.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.gazeta.pl!not-for-mail
References: <MPG.1eb170db78e34ce9989681@news.man.szczecin.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.gazeta.pl!not-for-mail
From: porneL <niusy@pornel.net>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Co znaczy ten bład
Date: Thu, 20 Apr 2006 12:19:47 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 23
Message-ID: <op.s8a0e9pofux2e6@pornel.net>
References: <MPG.1eb170db78e34ce9989681@news.man.szczecin.pl>
NNTP-Posting-Host: pornel.plus.com
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1145531990 15822 84.92.248.233 (20 Apr 2006 11:19:50 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 20 Apr 2006 11:19:50 +0000 (UTC)
X-User: pornelspam
User-Agent: Opera Mail(BETA2)/9.00 (MacPPC)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit