<html> <head> <script src="jquery.js"></script> <script type="text/javascript" src="q1.js"></script> </head> <body onload="sample()"> <p id="x">IGF</p> </body> </html> function sample(){ $("#x").text("ABC"); }