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>
<Style type = "text/css">
</Style>
<Script src = "jquery-1.9.1.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
$ (Function (){
$ ('# Button1'). click (function (){
// Set the style and animation effect for all elements with the id attribute
// $ ('Div [title] '). hide (3000 );
// $ ('Div [title = t1] '). hide (3000 );
// $ ('Div [title! = T1] '). hide (3000 );
//// The attribute value starts with t.
// $ ('Div [title ^ = t] '). hide (3000
// $ ('Div [title $ = 1] '). hide (3000 );
// $ ('Div [title * = t] '). hide (3000 );
/// The id value starts with d, and the title value ends with 3
$ ('Div [id ^ = d] [title $ = 4] '). hide (3000 );
})
})
</Script>
</Head>
<Body>
<Div title = "t1"> Layer 1
</Div>
<Div id = "div2" title = "t2"> Layer 2
</Div>
<Div id = "div3" title = "t3"> Layer 3
</Div>
<Div id = "div4" title = "t4"> Layer 4
</Div>
<Input id = "Button1" type = "button" value = "click"/>
</Body>
</Html>