🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #231960

Javascript Argument funkcji

#231960
From: konsul41
Date: Wed, 21 Feb 2018 10:50
35 lines
1942 bytes

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

Zrobiłem tak
'<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>'

działa w Chrome i IE tylko czy to jest prawidłowe
Najlepsze że w źródle strony widzę tekst ze znakami "
Technical Details
Message-ID: <5a8d4ed8$0$658$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Newsgroups: pl.comp.lang.php
X-Mozilla-News-Host: news://news.neostrada.pl:119
From: "konsul41@wp.pl" <konsul41@wp.pl>
Subject: Javascript Argument funkcji
Date: Wed, 21 Feb 2018 11:50:06 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
MIME-Version: 1.0
Lines: 35
Message-ID: <5a8d4ed8$0$658$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 95.48.160.163
X-Trace: 1519210200 unt-rea-a-01.news.neostrada.pl 658 95.48.160.163:61456
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit