Hope you would find it useful if you encounter the same issue, while you are using JQuery. Please correct me if my concept is
wrong or you have a better solution.
Why learn JQuery?
It is a JavaScript library/API/Frameworks allow you to develop website rapidly with nice feature that can work Cross-
browser, CSS3 Compliant and Lightweight Footprint, you can found lots of plugin on-line which can save you a lot of time to
develop you own method for some common feature.
Here it is the official site for JQuery, where you can find JQuery to download download/tutorials/documentation and get the latest
information about it.
jquery.com
One thing that I would like to remind myself from this notes is. All the even/action E.g. Blur, Onchange...etc should register on ready event. Of course, the most important thing is to reference the jquery.js between the HTML header tag.
E.g.
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
//Register on ready event
$(document).ready(function() {
$("#txt_Text").change(function(){
alert($("#txt_Text").val());
});
});
</script>
<title>Jquery Notes</title>
</head>
<body>
<input type="text" id="txt_Text"/>
</body>
</html>
The example above will display an alert box when we change the focus on txt_Text input control.
Happy coding.
No comments:
Post a Comment