Powerful jquery plug-in jqeuryUI for webpage dialog box effect! Simple

Source: Internet
Author: User
Tags blank page

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 .....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.