<html> <head> <meta charset="utf-8"/> <script src="sample.js"></script> <script src="jquery.js"></script> </head> <body onload="sample()"> <p id="memo"></p> </body> </html> function sample(){ str="<svg>"; str=str+"<rect x=\"50\" y=\"20\" width=\"300\" height=\"100\""; str=str+"style=\"fill:red\"/>"; str=str+"</svg>"; $("#memo").html(str); }