asp.net textbox return trigger event Picture in IMG Display _ Practical Tips

Source: Internet
Author: User
TextBox Carriage return Trigger Event
Copy Code code as follows:

Write directly in JS
<script language= "JavaScript" >
function Entertextbox ()
{
if (Event.keycode = && document.all["TextBox1"].value!= "")
{
Event.keycode = 9;
Event.returnvalue = false;
document.all["TextBox1"].click ();
}
}
</script>
<body onkeypress= "return Entertextbox ()" >
Here TextBox1 the ID of the textbox on the page
<script language= "JavaScript" >
function Entertextbox (button)
{
if (Event.keycode = && document.all["TextBox1"].value!= "")
{
Event.keycode = 9;
Event.returnvalue = false;
Document.all[button].click ();
}
}
</script>

In the Pageload incident.
Copy Code code as follows:

TextBox1.Attribute.add ("onkeypress", "Entertextbox (' Button1 ')");

Database fetch pictures in img display
If your database is stored in the picture file name.
The path to your local picture is image
You can use the following code:
Copy Code code as follows:



Picture highlighting
Copy Code code as follows:

<meta http-equiv= "Content-type" Conte Nt= "text/html; charset=gb2312 ">
<title> Untitled document </title>

<body>
<script L anguage= "JavaScript" ><!--
Function makevisible (cur,which) {
if (which==0)
Cur.filters.alpha.opacit y=70
Else
cur.filters.alpha.opacity=100
}
</script>

< /body>
Related Article

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.