<FORM id="sample">
<TABLE>
<TR>
<TD>Name </TD>
<TD><INPUT type="text"/></TD>
</TR>
<TR>
<TD>Age</TD>
<TD><INPUT type="text"/></TD>
</TR>
<TR>
<TD>Phone no.</TD>
<TD><INPUT type="text"/></TD>
</TR>
</TABLE>
</FORM>
Code language: HTML, XML (xml)
.focus {
border: 2px solid #AA88FF;
background-color: #FFEEAA;
}
Code language: CSS (css)
$('input[type="text"]').focus(function() {
$(this).addClass("focus");
});
$('input[type="text"]').blur(function() {
$(this).removeClass("focus");
});
Code language: JavaScript (javascript)
Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
i want to use focus option directly on textbox without using function how want i do this
somebody help
@yogesh ,using css you can do it..
[code language="html"][/code]
#txt:focus {backgrounf-color:red}
try it
working
Gracias era justo lo que estaba buscando!!!!
this work doing also with code:
$("input").css("background","red");
smaller and More understandable.
thank .