🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Argument funkcji

#51810
From: zpksoft
Date: Wed, 21 Feb 2018 13:13
32 lines
2365 bytes
W dniu środa, 21 lutego 2018 08:19:50 UTC+1 użytkownik kons...@wp.pl napisał:
> Jest sobie funkcja
> var set_hist_back_html = function ( tekst ) {
>      document.getElementById("hist_back").innerHTML = tekst;
>    };
> 
> 
> następnie w jednym z div jest takie coś
> 
> <input type="image" src="png/if_edit-user_46799.png"
>    onclick=
>    "
>     set_hist_back_html('<input type="image" src="png/if_back.png" 
> onclick="zaladuj_main_body(\'listakontrahentow.php?ID=1\');"  title="Do 
> tyłu"   alt="Do tyłu"> </td>');
> 
> 
>    "       title="Edytuj dane kontrahenta." alt="lista">
> 
> 
> Pytanie jak prawidłowo wpisać tekst
> '<input type="image" src="png/if_back.png" 
> onclick="zaladuj_main_body(\'listakontrahentow.php?ID=1\');"  title="Do 
> tyłu"   alt="Do tyłu"> </td>'
> 
> Jako argument funkcji set_hist_back_html

Napisałem na szybko, nie zapomnij wyłączyć znaki specjalne jak apostrofy wewnątrz łańcucha:

https://4programmers.net/JavaScript/Obiekty/String

Paweł
Technical Details
Message-ID: <c98e92e7-639e-4c69-9dcd-a5216d8ba464@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w142no222357ita.0!news-out.google.com!s63ni755itb.0!nntp.google.com!o66no220715ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <5a8d1d93$0$674$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
X-Received: by 10.107.173.35 with SMTP id w35mr2267865ioe.8.1519218782632;        Wed, 21 Feb 2018 05:13:02 -0800 (PST)
X-Received: by 10.157.22.195 with SMTP id s3mr160585ots.13.1519218782318; Wed, 21 Feb 2018 05:13:02 -0800 (PST)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w142no222357ita.0!news-out.google.com!s63ni755itb.0!nntp.google.com!o66no220715ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.lang.javascript
Date: Wed, 21 Feb 2018 05:13:02 -0800 (PST)
In-Reply-To: <5a8d1d93$0$674$65785112@news.neostrada.pl>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=217.99.107.33; posting-account=8ND_mgoAAAD5J9y9fnaTB1Kcu7xKWk7Q
NNTP-Posting-Host: 217.99.107.33
References: <5a8d1d93$0$674$65785112@news.neostrada.pl>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c98e92e7-639e-4c69-9dcd-a5216d8ba464@googlegroups.com>
Subject: Re: Argument funkcji
From: zpksoft <zpksoft@op.pl>
Injection-Date: Wed, 21 Feb 2018 13:13:02 +0000
Lines: 35
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit