In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the problems of mutual call between C # code and function". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. let's study and learn "what are the problems of mutual call between C # code and function"?
One of the problems of calling each other between C # code and # function
Q: how do I access the C # function in #?
A:
# execute the function in the C# code in the function:
Method 1. First, set up a button to write the called or processed content to button_click in the background.
2. Write a js function in the foreground with the content document.getElementById ("btn1"). Click ()
3. Call the js function in the foreground or background to fire the click event, which is equal to visiting the background c # function
Method 2: 1. The function is declared as public
Background code (you can also change public to protected)
Public string ss () {return ("a");}
2. You can call <% = fucntion ()% > in html
Foreground script
< script language=# > var a = "<% = ss ()% >"; alert (a); < / script >
Method 3: 1.
< script language= "#" >
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.