|
Blue Forest http://www.lslnet.com at 8:28 on August 25, 2006
Javascript help [the judge] how to write this, I do not to engage in successful I want to receive a page b pages over the traditional form of the implicit parameter to judge, but the judge did not know how to use Javascript to write, I would not write the corresponding tables, and we hope that you help me, got dizzy head
This is a b-page judgment
[code]
"Script>
......
If (tt== "1")
{
Tr1.style.display= "";
}
If (tt== "2")
{
Tr2.style.display= "";
}
If (tt== "3")
{
Tr3.style.display= "";
}
If (tt== "4")
{
Tr4.style.display= "";
}
If (tt== "5")
{
Tr5.style.display= "";
}
If (tt== "6")
{
Tr6.style.display= "";
}
Document.write (tt);
"/script>
[/code]
[color=red]a [/color] Page :
[code]
"%@LANGUAGE=" VBSCRIPT "CODEPAGE=" 936 "dilatation
"!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 are
"Meta http-equiv=" Content-Type "content=" text/html; charset=gb2312 "everywhere
"Title>a</title>
"Style>
. Table-topleft
{
Border-left:#CCCCCC dotted 1px;
Border-top : #CCCCCC dotted 1px;
}
. Table-rightbottom
{
Border-bottom:#CCCCCC dotted 1px;
Border-right:#CCCCCC dotted 1px;
}
"/style>
"Script language=" JavaScript ""
<!--
Function show () (
If (f1.s1.value== "1")
{
Tr1.style.display= "";
}else
{
Tr1.style.display= "none";
}
If (f1.s1.value== "2") (
Tr2.style.display= "";
}
Else
{
Tr2.style.display= "none";
}
If (f1.s1.value== "3") (
Tr3.style.display= "";
}
Else
{
Tr3.style.display= "none";
}
If (f1.s1.value== "4") (
Tr4.style.display= "";
}
Else
{
Tr4.style.display= "none";
}
If (f1.s1.value== "5") (
Tr5.style.display= "";
}
Else
{
Tr5.style.display= "none";
}
If (f1.s1.value== "6") (
Tr6.style.display= "";
}
Else
{
Tr6.style.display= "none";
}
}
//-->
"/script>
"/head>
"Body>
"Form filled="f"" f1 "name="_ftn1"" f1 "method=" post "action=" ""
"Width= table" 200 "border" 0 "to save the" center "cellpadding=" 0 "cellspacing" 0 "formal" table-topleft ""
"Tr>
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <select name="_ftn1" "s1" onchange= "show ()," "
"Option>SELECT</option>
"Value= option" 1 "and" 1</option>
"Value= option" 2 "," 2</option>
"Value= option" 3 "," 3</option>
"Value= option" 4 "" 4</option>
"Value= option" 5 "," 5</option>
"Option value=" 6 "" 6</option>
"/select></td>
"Per
"Tr filled="f"" tr1 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <a style='mso-footnote-id:ftn1' "b.asp?type=a" "tr1</a></td>
"Per
"Tr filled="f"" tr2 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <a style='mso-footnote-id:ftn1' "b.asp?type=2" "tr2</a></td>
"Per
"Tr filled="f"" tr3 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <a style='mso-footnote-id:ftn1' "b.asp?type=3" "tr3</a></td>
"Per
"Tr filled="f"" tr4 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <a style='mso-footnote-id:ftn1' "b.asp?type=4" "tr4</a></td>
"Per
"Tr filled="f"" tr5 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <a style='mso-footnote-id:ftn1' "b.asp?type=5" "tr5</a></td>
"Per
"Tr filled="f"" tr6 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <a style='mso-footnote-id:ftn1' "b.asp?type=6" "tr6</a></td>
"Per
"Tr filled="f"" tr7 "Historic Significance of the Transitional Budget" display : ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom ""] speech color= "#0066FF" "a.asp</font></td>
"Per
"ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_1127825915"> </o:OLEObject>
"/form>
"/body>
"/html>
[/code]
[color=red]b [/color] Page :
[code]
"%@LANGUAGE=" VBSCRIPT "CODEPAGE=" 936 "dilatation
"!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 are
"Meta http-equiv=" Content-Type "content=" text/html; charset=gb2312 "everywhere
"Title>b</title>
"Style>
. Table-topleft
{
Border-left:#CCCCCC dotted 1px;
Border-top : #CCCCCC dotted 1px;
}
. Table-rightbottom
{
Border-bottom:#CCCCCC dotted 1px;
Border-right:#CCCCCC dotted 1px;
}
"/style>
"% 'Tt=request (" type ") endothelium
"Script>
Function QueryString (item) (
Var sValue=location.search.match (new RegExp ( "[\?\&]" +item+ "= ([^\&]*) (\&?)", "i"))
Return sValue?sValue[1]:sValue
}
Var tt = QueryString ( "type");
If (tt== "1")
{
Tr1.style.display= "";
}
If (tt== "2")
{
Tr2.style.display= "";
}
If (tt== "3")
{
Tr3.style.display= "";
}
If (tt== "4")
{
Tr4.style.display= "";
}
If (tt== "5")
{
Tr5.style.display= "";
}
If (tt== "6")
{
Tr6.style.display= "";
}
Document.write (tt);
"/script>
"/head>
"Body>
"Form filled="f"" f1 "name="_ftn1"" f1 "method=" post "action=" ""
"Width= table" 200 "border" 0 "to save the" center "cellpadding=" 0 "cellspacing" 0 "formal" table-topleft ""
"Tr>
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <select name="_ftn1" "s1" onchange= "show ()" disabled= "disabled" "
"Option>SELECT</option>
"Value= option" 1 "and" 1</option>
"Value= option" 2 "," 2</option>
"Value= option" 3 "," 3</option>
"Value= option" 4 "" 4</option>
"Value= option" 5 "," 5</option>
"Option value=" 6 "" 6</option>
"/select></td>
"Per
"Tr filled="f"" tr1 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr1b</td>
"Per
"Tr filled="f"" tr2 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr2b</td>
"Per
"Tr filled="f"" tr3 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr3b</td>
"Per
"Tr filled="f"" tr4 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr4b</td>
"Per
"Tr filled="f"" tr5 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr5b</td>
"Per
"Tr filled="f"" tr6 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr6b</td>
"Per
"Tr filled="f"" tr7 "Historic Significance of the Transitional Budget" display : ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom ""] speech color= "#FF0000" "b.asp</font></td>
"Per
"ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_1127825915"> </o:OLEObject>
"/form>
"/body>
"/html>
[/code] |
Are you twins Christmas? Gloomy |
B pages is a major mistake, the script must call in a statement after the ID, so I moved it back to the standard way calling.
[html]
"!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 are
"Meta http-equiv=" Content-Type "content=" text/html; charset=gb2312 "everywhere
"Title>b</title>
"Style>
. Table-topleft
{
Border-left:#CCCCCC dotted 1px;
Border-top : #CCCCCC dotted 1px;
}
. Table-rightbottom
{
Border-bottom:#CCCCCC dotted 1px;
Border-right:#CCCCCC dotted 1px;
}
"/style>
"% 'Tt=request (" type ") endothelium
"/head>
"Body>
"Form filled="f"" f1 "name="_ftn1"" f1 "method=" post "action=" ""
"Width= table" 200 "border" 0 "to save the" center "cellpadding=" 0 "cellspacing" 0 "formal" table-topleft ""
"Tr>
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" <select name="_ftn1" "s1" onchange= "show ()" disabled= "disabled" "
"Option>SELECT</option>
"Value= option" 1 "and" 1</option>
"Value= option" 2 "," 2</option>
"Value= option" 3 "," 3</option>
"Value= option" 4 "" 4</option>
"Value= option" 5 "," 5</option>
"Option value=" 6 "" 6</option>
"/select></td>
"Per
"Tr filled="f"" tr1 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr1b</td>
"Per
"Tr filled="f"" tr2 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr2b</td>
"Per
"Tr filled="f"" tr3 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr3b</td>
"Per
"Tr filled="f"" tr4 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr4b</td>
"Per
"Tr filled="f"" tr5 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr5b</td>
"Per
"Tr filled="f"" tr6 "Historic Significance of the Transitional Budget" display:none ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom "" tr6b</td>
"Per
"Tr filled="f"" tr7 "Historic Significance of the Transitional Budget" display : ""
"Td height=" 30 "to save the" center "valign=" middle "formal" table-rightbottom ""] speech color= "#FF0000" "b.asp</font></td>
"Per
"ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_1127825915"> </o:OLEObject>
"/form>
"Script>
Function QueryString (item) (
Var sValue=location.search.match (new RegExp ( "[\?\&]" +item+ "= ([^\&]*) (\&?)", "i"))
Return sValue?sValue[1]:sValue
}
Var tt = QueryString ( "type");
If (tt== "1")
{
Document.getElementById ( "tr1"). Style.display= "";
}
If (tt== "2")
{
Document.getElementById ( "tr2"). Style.display= "";
}
If (tt== "3")
{
Document.getElementById ( "tr3"). Style.display= "";
}
If (tt== "4")
{
Document.getElementById ( "tr4"). Style.display= "";
}
If (tt== "5")
{
Document.getElementById ( "tr5"). Style.display= "";
}
If (tt== "6")
{
Document.getElementById ( "tr6"). Style.display= "";
}
Document.write (tt);
"/script>
"/body>
"/html>
[/html] |
Oh, this thing, I thought on the head, where the page can be quickly loaded before judgment is available behind the original standards. The reason is because I put my head between all written before on the head between the function can also call normal, it is because those were due to the incident, can be deployed as onclick, onchange. Too good to learn things, Thank you, Big Brother, a good Christmas gift, thank you, thank you!
|
|