Article View: pl.comp.lang.javascript
Article #50325Re: Argument funkcji
From: zpksoft
Date: Wed, 21 Feb 2018 05:06
Date: Wed, 21 Feb 2018 05:06
41 lines
1242 bytes
1242 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 //załaduj ciąg do zmiennej var par='<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>'; //a następnie: set_hist_back_html(par); Paweł
Message-ID:
<8b85092a-d3cf-4a9f-8be1-cd3342c8d772@googlegroups.com>
Path:
polish.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!not-for-mail
References:
<5a8d1d93$0$674$65785112@news.neostrada.pl>