" to call the background, and the syntax is "<%=method %>". Javascript calls a server-side exe or a function in a dll, or even a Linux binary executable file, runs in the server, and returns the result to js after running."/> " to call the background, and the syntax is "<%=method %>". Javascript calls a server-side exe or a function in a dll, or even a Linux binary executable file, runs in the server, and returns the result to js after running.">

Home  >  Article  >  Web Front-end  >  JavaScript calls background methods

JavaScript calls background methods

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-04-12 16:06:263029browse

In javascript, you can use "4eed03230346664e54006e16f8581c1e" to call the background, and the syntax is "6ec5b86f14530fc58340c0473f601180". Javascript calls a server-side exe or a function in a dll, or even a Linux binary executable file, runs it on the server, and returns the result to js after running.

JavaScript calls background methods

The operating environment of this tutorial: Windows 7 system, JavaScript version 1.8.5, Dell G3 computer.

javascript calls the background method

##Directly use 4eed03230346664e54006e16f8581c1ecall

Front-end JS:

<script type="text/javascript">  
       var methodStr = "<%=BehindMethod() %>";  
       alert(methodStr);  
       </script>

Backend method:

public static string BehindMethod()
        {
            return "这是一个后台的方法";
        }

1)

BehindMethod()publicAccess modification before the method Don’t forget the symbol;

2) This method has limitations - BehindMethod() will only be automatically called when the

ASPX page is loaded or posted back, and the call cannot be controlled manually.

Recommended learning:

javascript video tutorial

The above is the detailed content of JavaScript calls background methods. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:Timers in JavascriptNext article:Timers in Javascript