![]() |
# 1 |
חבר מתקדם
|
ajax+js | קבלה ושינוי td
אני מקבל דרך php ואג'קס את הקטע קוד הבא:
קוד:
<td class='car'> <a href='' title=''> <img src='audi.jpg' height='77' alt='' /> </a><br />asd</td> <script type="text/javascript"> document.getElementById('price').innerHTML = '500,000'; </script> ויש <td id="price".. להיות יותר ספציפי: למה הקוד הבא לא עובד? אני יודע שבonclick וב onload ואם הוא יופיע אחרי הID שהוא אמור לערוך הוא יעבוד, אבל למה ככה הוא לא עובד? קוד:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>lalala</title> </head> <body> <script type="text/javascript"> document.getElementById('belong2family').innerHTML = "texttexttext"; </script> <div class='car'> <a href='' title=''> <img src='lala.jpg' height='77' alt='' /> </a><br />asd </div> test <div id="price"><br />lalala</div> <div id="belong2family"><br />shot me</div> </body> </html> Last edited by FuZuL; 03-02-09 at 23:38.. |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|