<html> <head> <script src="jquery.js"></script> <script type="text/javascript" src="q2.js"></script> </head> <body onload="sample()"> <p id="x">IGF</p> </body> </html> function sample(){ var str; str="<svg><circle cx=\"170\" cy=\"180\" r=\"100\"/></svg>" $("#x").html(str); }