In the past, Javascript was written manually. Although there was no major problem, it was prone to errors. I have introduced a Microsoft internal Javascript Writing Tool, Script #. I just used it to introduce it. For details, I can view the help PDF file.
Download and install the SDK first. Take VS2005 as an example.
After installation, you can create a new website. Note that only the C # website is supported, and VB is not supported.
Generate a bunch of code and a Default. aspx page.
Page, there is a piece of code. 1 <Code>
2 using System; using ScriptFX; public class MyScriptlet {
3 public static void Main (ScriptletArguments arguments ){
4}
5}
6 </Code>
You can write the C # language here. I am too tired to write it here without any prompt. On the design page, right-click and select Edit C # Code.
Now, you can write code in a prompt range. When the code is run, Javascript is generated.
Example: 1 using System. DHTML;
2 using ScriptFX;
3 using ScriptFX. UI;
4
5 public class MyScriptlet
6 {
7
8 public static void Main (ScriptletArguments arguments)
9 {
10 MyScriptlet mys = new MyScriptlet ();
11 System. Callback cb = new System. Callback (mys. Execute );
12 windows. SetTimeout (cb, 1000 );
13}
14
15 public void Execute ()
16 {
17 string msg = "hello world ";
18 this. ShowMsg (msg );
19}
20
21 protected void ShowMsg (string msg)
22 {
23 Window. Document. Title = msg;
24}
25}
It is easy to see what the code is.