Yes, You can. Here is sample code. :)
<script type="text/javascript">
$(function(){
$("input[type=text]").bind("focus",function(){
var value = $(this).val();
alert(value);
});
</script>
<input type="text" name="relation[]" class="text_relation" value="1"/>
<input type="text" name="relation[]" class="text_relation" value="2"/>
<input type="text" name="relation[]" class="text_relation" value="3"/>
$(function(){
$("input[type=text]").bind("focus",function(){
var value = $(this).val();
alert(value);
});
</script>
<input type="text" name="relation[]" class="text_relation" value="1"/>
<input type="text" name="relation[]" class="text_relation" value="2"/>
<input type="text" name="relation[]" class="text_relation" value="3"/>
** Just replace "focus" to "blur" for blur action.
Thanks.
From: asma tuli <asmatuli@gmail.com>
To: phpexperts@yahoogroups.com
Sent: Thursday, June 30, 2011 11:56 AM
Subject: [phpXperts] jQuery Help
I have 3 input text box like
<input type="text" name="relation[]" class="text_relation" />
<input type="text" name="relation[]" class="text_relation" />
<input type="text" name="relation[]" class="text_relation" />
I would like to apply .focus() and .blur() on each of them individually.
How is it possible ??
<input type="text" name="relation[]" class="text_relation" />
<input type="text" name="relation[]" class="text_relation" />
<input type="text" name="relation[]" class="text_relation" />
I would like to apply .focus() and .blur() on each of them individually.
How is it possible ??
__._,_.___
Visit phpXperts website at www.phpxperts.net
.
__,_._,___
No comments:
Post a Comment