asp.net ajax 类型系统demo
<mce:script language=javascript><!--
//注册命名空间
Type.registerNamespace("Demo");
Demo.Message=function(content,publishTime)
{
this._content = content;
this._publishTime = publishTime;
}
Demo.Message.prototype=
{
get_content: function()
{
return this._content;
},
get_publishTime: function()
{
return this._publishTime.format("yyyy-MM-dd HH:mm:ss");
},
toString: function()
{
return this.get_content() + " " + this.get_publishTime();
}
}
//注册类
Demo.Message.registerClass("Demo.Message");
Demo.IContent=function()
{
}
Demo.IContent.prototype
{
showContent:function()
{}
}
//注册接口
Demo.IContent.registerInterface("Demo.IContent");
Demo.MessageWithUserId = function(userId, content, publishTime)
{
Demo.MessageWithUserId.initializeBase(this, [content, publishTime]);
this._userId = userId;
}
// 定义Demo命名空间下的MessageWithUserId类的方法
Demo.MessageWithUserId.prototype =
{
get_userId: function()
{
return this._userId;
},
showContent: function()
{
return Demo.MessageWithUserId.callBaseMethod(this, 'get_content')
},
// callBaseMethod用于调用基类的方法
toString: function()
{
return this.get_userId() + " " + Demo.MessageWithUserId.callBaseMethod(this, 'toString');
}
}
// 注册一个继承自Demo.Message类和Dem
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
1、直接在前台调用 javascript 函数
很简单,在 head 元素之间加入 script 元素,将 type 元素设置为 " text/javascript "
如:
<head runat="server">
<script type="text/javascript" >
function ShowName(str)
{
alert("您的名字为:("+str+")");
}
</script>
<title> ......
一、怎么将CheckBox的值存储在数据库中,即一个CheckBox被选定后,如何在数据库中表示这种选定?
首先在数据库中定义几列bit类型的数据列,用来表示某个CheckBox是否被选定,数据库中的值为true或false.
前台代码:
是否推荐:<asp:CheckBox ID="IsRecommend" runat="server" />
......
原出处:http://blog.163.com/zwx_gis/blog/static/32434435200971072634757/
Web编程相关 2009-08-10 19:26 阅读15 评论0
Ajax (Asynchronous JavaScript and XML) 是多种技术的集合,包括JavaScript、XHTML、CSS、DOM、XML、XSTL、XMLHttpRequest等,其中XHTM ......