|
<%@ Page Language="C#" AutoEventWireup="false" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 id="Head1" runat="server">
<title>JavaScript Module Pattern</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" id="btnLucky" value="Get My Lucky Number" /><br />
Your lucky Number is:
<label id="luckyNum">
</label> <br />
<input type="button" id="btnColor" value="Get My Lucky Color" /><br />
Your lucky Color is:
<label id="lblColor">
</label>
</div>
</form>
</body>
</html>
<script src="jquery-1.5.1.js" type="text/javascript"></script>
<script src="module.pattern.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#btnLucky").click(function(){
$("#luckyNum").text(SearchEngine.getYourLuckyNumber());
});
$("#btnColor").click(function(){
$("#lblColor").text(SearchEngine.subSearch.getYourLuckyColor());
});
});
</script>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a Senior Software Developer working since 2005 in Microsoft ASP.Net and related Technologies.
I work on C#, Asp.Net, MVC, RAZOR, Entity Framework, JavaScript, jQuery, HTML5, CSS3, WCF, Silverlight, WPF, MVVM, SQL, SSIS, etc. Did Function Point Analysis, WBS to estimate projects and worked on Agile Scrum team.
I enjoy on exploring new technologies by implementing and writing about them, great interest in learning Design Patterns and their implementations. I love learning, writing JavaScript; now my favorite JavaScript library is jQuery. I enjoy writing jQuery Plugins and core JavaScript. I also write Technical blogs here. You can find me on LinkedIn.
I wrote an article on Swami Vivekananda posted his audio speeches by reading them.