Kristabs Posted November 5, 2006 Report Share Posted November 5, 2006 Kā var dabūt bloka saturu? <div id="bloks">saturs saturs</div> Vajadzētu izdabūt iekš mainīgā to "saturs saturs". Link to comment Share on other sites More sharing options...
andrisp Posted November 5, 2006 Report Share Posted November 5, 2006 document.getElementById('bloks').innerHTML; Vai arī ar DOM metodēm. Link to comment Share on other sites More sharing options...
bubu Posted November 5, 2006 Report Share Posted November 5, 2006 Pareizāk imo būtu: document.getElementById('bloks').firstChild.nodeValue; Tikai tas, ja tad <div> bloks nesatur citus html elementus. Link to comment Share on other sites More sharing options...
Recommended Posts