Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JS] Dynamiczne dodawanie div'ów, ie nie czyta
yarek12
post
Post #1





Grupa: Zarejestrowani
Postów: 127
Pomógł: 0
Dołączył: 5.08.2010

Ostrzeżenie: (10%)
X----


Witam, mam poniższy skrypt:

  1. function addElement() {
  2. var ni = document.getElementById(\'orders\');
  3. var numi = document.getElementById(\'theValue\');
  4. var num = (document.getElementById(\'theValue\').value -1)+ 2;
  5. numi.value = num;
  6. var newdiv = document.createElement(\'tr\');
  7. var divIdName = \'order\'+num+\'\';
  8. newdiv.setAttribute(\'id\',divIdName);
  9. newdiv.innerHTML = \'tresc ktora sie dodaje\';
  10. ni.appendChild(newdiv);
  11. }


Działa, niestedy nie pod IE, proszę o pomoc.

z góry dziękuje
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 04:18