Searching...
Tuesday, 23 April 2013

JQuery Hello world example

12:32

JQuery

jQuery is a lightweight JavaScript library which make it easier to user JavaScript in web pages

Please see more detail About Jquery .

We can download jQuery library from http://jquery.com/download/ and add the source details inside script tag

Example

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title> 
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$("#jqueryMessage").html("Hello world ..this is from JQuery");
});
</script>
<div id="jqueryMessage">
</div>
</body>
</html>

Output





image

0 comments: