🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: jaki obiekt/metoda do zmiennej zawartosci

#50685
From: zlotowinfo
Date: Tue, 29 Mar 2011 17:22
18 lines
1721 bytes
nie do końca zrozumiałem na początku, poprawiłem i coś nie pokazuje linków 
tylko normalnie tekst ktory został wpisany
<a href=http://wp.pl>zmieniony tekst</a>


<script>
function changeSpanText(id,txt)
{
  p2=document.getElementById(id);
  if(typeof(p2.innerText) != 'undefined'){p2.innerText = txt;}
  else if(typeof(p2.textContent) != 'undefined') {p2.textContent = txt;}
  else if(typeof(p2.text) != 'undefined') {p2.text = txt;}}
</script>

<span id="dupa"></span><br />
<input type="button" value="Change Span innerText"
onclick="changeSpanText('dupa','<a href=http://wp.pl>zmieniony tekst</a>')" 
/>
Technical Details
Message-ID: <imt4g7$bl6$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <imobbc$i8o$1@inews.gazeta.pl> <4d90fbcf$0$2455$65785112@news.neostrada.pl> <imruil$84e$1@inews.gazeta.pl> <imrvv9$svi$1@news.onet.pl> <ims4co$pq9$1@inews.gazeta.pl> <ims8bo$5uk$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "zlotowinfo" <usuntousun@go2.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Re: jaki obiekt/metoda do zmiennej zawartosci
Date: Tue, 29 Mar 2011 19:22:17 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 20
Message-ID: <imt4g7$bl6$1@inews.gazeta.pl>
References: <imobbc$i8o$1@inews.gazeta.pl> <4d90fbcf$0$2455$65785112@news.neostrada.pl> <imruil$84e$1@inews.gazeta.pl> <imrvv9$svi$1@news.onet.pl> <ims4co$pq9$1@inews.gazeta.pl> <ims8bo$5uk$1@news.onet.pl>
NNTP-Posting-Host: 77-45-114-99.sta.asta-net.com.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1301419335 11942 77.45.114.99 (29 Mar 2011 17:22:15 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Tue, 29 Mar 2011 17:22:15 +0000 (UTC)
In-Reply-To: <ims8bo$5uk$1@news.onet.pl>
X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16543
X-Priority: 3
X-Newsreader: Microsoft Windows Mail 6.0.6002.18197
X-User: zlotowinfo
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit