javascript - Using jquery append method -


this question has answer here:

in code did like

$("#jdoe").append("<h3>test</h3>"); 

html

<html> <head> </head> <body> <div id="jdoe"></div> </body> </html> 

it worked expected (the text test displays in h3), expecting if view source in browser see

<html> <head> </head> <body> <div id="jdoe"><h3>test</h3></div> </body> </html> 

please correct me if expectations wrong

you haven't changed source of page, you've changed dom. if use developer tools preferred browser, you'll see changes there.

i think can developer tools browsers hitting f12.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -