• Method 4:
    The following is a quote fragment:
    Copy code Code As follows:



    〈! --Used to store the function you want to call--〉

    in .CS:
    The following is a reference fragment:
    Copy code The code is as follows:

    public Page_OnLoad()
    {
    if (!Page.IsPost())
    {
    string strFunName=Request.Form["FunName"]!=null?Request.Form["FunName"]:"";
    //Determine which function to call based on the value passed back
    switch(strFunName)
    {
    case "enter()":
    enter() ; //Call this function
    break;
    case "other":
    //Call other functions
    break ;
    default:
    //Call the default function
    break;
    }
    }
    }
    public void enter()
    {
    //… For example, calculate a certain value
    }
    Related labels:
    source:php.cn
    Previous article:JS this scope and solution to the problem of too long GET transmission value_javascript skills Next article:Example of making the scroll bars (slider) in two divs on the page move synchronously_jquery
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Articles by Author
    Latest Issues
    Related Topics
    More>
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template