Hi,
For example there is a js file named: JScript.js,
there is only a function in the JScript.js file, like below:
function showWelcome()
{
alert("Hello World!");
}
then register this script file like this in the page's load event:
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterClientScriptInclude("script", "JScript.js");
}
then you can use the javascript function in the page's aspx file:
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" OnClientClick="showWelcome()"/>
Hope it helps.