JQuery Hello World Sample
Here is a jQuery hello world page for anybody wanting to get started with JQuery.
1. Download jQuery at
http://docs.jquery.com/Downloading_jQuery#Download_jQuery
2. Place the “jquery-1.2.6.js” file into a folder called JQueryJS inside your ASP web application
3. Next create a default.js file in the same folder as the jquery-1.2.6.js file and paste the code below into the default.js file.
$(document).ready(function() {
$("#helloWorld").click(function() {
alert("Hello world!");
});
});
4. Run the aspx page below and click the DIV to get started with JQuery.
more examples soon.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="jQuery1.aspx.vb" Inherits="jQuery1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="JQueryJs/jquery-1.2.6.js"></script>
<script type="text/javascript" src="JQueryJs/default.js">
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="helloWorld" style="height: 194px; width: 260px; background-color: #FF9933"></div>
</div>
</form>
</body>
</html>
Revision number 2, Saturday, October 18, 2008 5:50:50 PM by Josh Ledgard
You must Login to comment.
|
Sat, Nov 29, 2008 3:03 PM
by semsem0
|
i do this but nothing happen no alert came to me :S
|
|
Mon, Mar 16, 2009 4:50 AM
by sumanth144
|
this is first time i have use this its really easy and simple
|
Revision #21
Thu, Oct 22, 2009 9:30 PM
by
|
ASP.NET MVC Framework
Overview MVC (Model-View-Controller) now comes to ASP.NET too. As Scott Gu says "If you are looking to build your web applications using a MVC approach, I think you'll find this new ASP.NET MVC Framework option very clean and easy to use. It will
|
New
Thu, Nov 13, 2008 10:56 PM
by
|
HTML login page using JQuery
Here is the login form it has user id and password text boxes. When user clicks Login button, it calls ajaxLogin.aspx page in background process using JQuery and it returns login success or failure message and prints in one span element. Example uses jquery
|
Revision #13
Wed, May 27, 2009 12:30 AM
by
|
Javascript
JavaScript holds it all together on the client side. There are a number of extensions that have been made to improve and expand base JavaScript object functionality. Blog Posts Four ASP.NET AJAX JavaScript UI Methods You Should Learn: Dave Ward describes more
|