Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> tworzenie div w js
bartek6949
post
Post #1





Grupa: Zarejestrowani
Postów: 89
Pomógł: 1
Dołączył: 18.05.2009

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


mam oto taki skrypt ktory powinien tworzyc div w js a dokladnej powinien tworzy nowy div i wrzuca go do diva id="a" oto kod pilnie potrzebuje pomocy
  1. function createDiv()
  2. {
  3. var divTag = document.createElement('div');
  4.  
  5. divTag.id = 'div1';
  6.  
  7. divTag.setAttribute('background','transparent url(assassin.png) no-repeat');
  8. divTag.setAttribute('height','35px');
  9. divTag.setAttribute('left','36px');
  10. divTag.setAttribute('top','18px');
  11. divTag.setAttribute('position','absolute');
  12. divTag.setAttribute('width','35px');
  13.  
  14.  
  15.  
  16. document.getElementById('a').appendChild(divTag);
  17. }
  18. new createDiv();


Ten post edytował bartek6949 5.11.2009, 22:20:33
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: 26.09.2025 - 03:22