易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript事件驱动框架 收藏

  javascript事件驱动框架 收藏
一个简单的事件驱动框架的演示:
/*ControlDemo.js*/
//事件驱动框架(演示)
function ControlDemo(page)
{
 //初始化Page
 if (page == null)
 {
  page = self;
 }
 if (page != self)
 {
  //Do sth. here...
 }
 this.page = page;
 //Properties
 this.keyPressed = 0;
 //Controlable Entities
 //PageBody
 this.body1 = page.document.getElementById("main");
 page.PageLoadEventSender = this;
 this.body1.onload = function(){this.PageLoadEventSender.PageLoad(this.PageLoadEventSender,page.event);}
 
 //Button1
 this.button1 = page.button1;
 this.button1.value = "确定";
 this.button1.ClickEventSender = this;
 this.button1.onclick = function(){this.ClickEventSender.Button1_Click(this.ClickEventSender,page.event);}
 //Button2
 this.button2 = page.button2;
 this.button2.value = "取消";
 this.button2.ClickEventSender = this;
 this.button2.onclick = function(){this.ClickEventSender.Button2_Click(this.ClickEventSender,page.event);}
 
 //Textbox1
 this.textbox1 = page.textbox1;
 this.textbox1.style.width = "100%";
 this.textbox1.rows = 10;
 this.textbox1.KeyUpSender = this;
 this.textbox1.onkeyup = function(){this.KeyUpSender.Textbox1_KeyUp(this.KeyUpSender,page.event);}
 this.textbox1.MouseMoveSender = this;
 this.textbox1.onmousemove = function(){this.MouseMoveSender.Textbox1_MouseMove(this.MouseMoveSender, page.event);}
 //Labels
 this.label1 = page.document.getElementById("label1");
 this.label2 = page.document.getElementById("label2");
 this.label3 = page.document.getElementById("label3");
 //EventHandlers
 this.PageLoad = function(sender,event)
 {
  this.page.defaultStatus = "事件驱动框架演示~~";
  this.page.resizeTo(600,400);
 }
 this.Button1_Click = function(sen


相关文档:

javascript调用后台的添、删、改、查

前台:
<%@ Page AutoEventWireup="true" CodeBehind="CustomerBizList.aspx.cs" Inherits="SSMIS.UI.MISUI.CustomerBizList"
    Language="C#" MasterPageFile="/Master/WebAdmin.master" %>
<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="bcr">
    ......

javascript 中this 的用法:

javascript 中this 的用法:
1.<div onclick="// 可以在里面使用this">division element</div> this 指向div
2.    <div id="elmtDiv">division element</div>
       <script language="javascript">
      ......

javascript的相关技术文章的收藏

表单效果:http://www.sprymedia.co.uk/article/KeyTable
表单效果:http://www.datatables.net/examples/
图表效果: http://filamentgroup.com/dwpe/#codeexamples
图表效果: http://people.iola.dk/olau/flot/examples/
表单效果:http://www.reconstrukt.com/ingrid/src/example1.html#
树形目录:http ......

javaScript 打开窗口最大化

用js 打开新窗口的时候,窗口最大化。
function showBigLisence(url){
 if(url!== undefined && url!== null && url !== ''){
    var scrWidth=screen.availWidth;
     var scrHeight=screen.availHeight;
     var self=window.open( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号