Let's start with the simplest logon window on the webpage;
Before you start, download the jquery plug-in.
I am used to using vs2008 as a Web page. Add a blank page first.
This is the simplest way... Insert in the body first
<Body>
<Div id = "div1">
<Table>
<Tr> <td> User Name </td> <input type = "text" style = "width: 100px"/> </td> </tr>
<Tr> <td> password </td> <input type = "text" style = "width: 100px"/> </td> </tr>
</Table>
</Div>
</Body>
This is the time we want to download the decompress, The jquery1.4.2 folder in the jquery-1.4.2.js and the js folder in the jquery-ui-1.8.11.custom folder jquery-ui-1.8.11.custom.min.js, copy these two to the directory
Now let's add references. If 2008 sp1 is installed, you can directly drag the two js files to the Code head tag. Of course, you can also manually add them, as shown in the figure:
Next we will use it,
<Script type = "text/javascript">
$ (Function (){
$ ("# Div1"). dialog ();
});
</Script>
Directly call the dialog () method of the object; all right... Let's see the results.
Not very nice, right... don't be nervous, at this time we copy the css folder in the jquery-ui-1.8.11.custom folder, see the figure...
Add reference to this jquery-ui-1.8.11.custom.css and css file
Okay... Check the effect.
Just a few simple codes...
Copy codeThe Code is as follows: <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html
Xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> </title>
<Link href = "./css/ui-lightness/jquery-ui-1.8.11.custom.css" rel = "stylesheet" type = "text/css"/>
<Script src = "jquery-1.4.2.js" type = "text/javascript"> </script>
<Script src = "jquery-ui-1.8.11.custom.min.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
$ (Function (){
$ ("# Div1"). dialog ();
});
</Script>
</Head>
<Body>
<Div id = "div1">
<Table>
<Tr> <td> User Name </td> <input type = "text" style = "width: 100px"/> </td> </tr>
<Tr> <td> password </td> <input type = "text" style = "width: 100px"/> </td> </tr>
</Table>
</Div>
</Body>
</Html>
Everyone learns... Let me know if there are any good ones .....