TextBox press ENTER trigger event
Copy codeThe Code is as follows:
// Directly write in js
<Script language = "javascript">
Function EnterTextBox ()
{
If (event. keyCode = 13 & document. all ["TextBox1"]. value! = "")
{
Event. keyCode = 9;
Event. returnValue = false;
Document. all ["TextBox1"]. click ();
}
}
</Script>
<Body onkeypress = "return EnterTextBox ()">
// TextBox1 indicates the TextBox ID on the page.
<Script language = "javascript">
Function EnterTextBox (button)
{
If (event. keyCode = 13 & document. all ["TextBox1"]. value! = "")
{
Event. keyCode = 9;
Event. returnValue = false;
Document. all [button]. click ();
}
}
</Script>
In the PageLoad event
Copy codeThe Code is as follows:
TextBox1.Attribute. add ("onkeypress", "EnterTextBox ('button1 ')");
The image of the database is displayed on the img.
Assume that the image file name is stored in your database.
The path of your local Image is Image
You can use the following code:
Copy codeThe Code is as follows:
Highlight Images
Copy codeThe Code is as follows:
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> untitled document </title>
</Head>
<Body>
<Script language = "javascript"> <! --
Function makevisible (cur, which ){
If (which = 0)
Cur. filters. alpha. opacity = 70
Else
Cur. filters. alpha. opacity = 100
}
</Script>
</Body>
</Html>