Load a javascript function while page loads

I want to run a javascript function when the page loads. But as my page derives from the master page there is no form . The is my aspx file <%@ Page Title="" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeFile="test3.aspx.vb" Inherits="test3" %>

I want to run the LoadArray() function initialy when the page loads. This function is calling a pagemethod given in aspx.vb code file.. Partial Class test3 Inherits System.Web.UI.Page Public Shared Function Load_Array() As String() Dim Model_Name_old As String()() Dim mod_code As String() Dim mod_name As String() Dim cod_upper As Integer //calling webservice that retunrs a jagged array Dim ins As New localhost_insert_model.dbModel Model_Name_old = ins.get_Model_Name("A") mod_code = Model_Name_old(0) mod_name = Model_Name_old(1) Return mod_name End Function End Class So how can i load the javascrip LoadArray() function onPageLoad in this scenario??

以上就是Load a javascript function while page loads的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准