【发布时间】:2011-01-28 01:25:42
【问题描述】:
我想在我的网站上弹出模态窗口(它是一个背景不透明的窗口)以显示一些数据。请查看下面的图片:
我想使用类似的实现:http://www.smartclient.com/?skin=Enterprise#modality
但我不知道该怎么做。谁能帮我实现这个?我找不到从这里下载的文件:http://www.smartclient.com/product/download.jsp
这不就是 MooTools 或 jQuery 框架之类的吗?我不明白要从他们下载的库中包含哪个文件。
有人可以提供一个示例 html 页面代码吗?
另一件事是,我在他们的源代码中看到了以下代码:
isc.IButton.create({
ID: "touchButton",
width: 120,
title: "Touch This"
});
isc.Label.create({
left: 150,
height: 20,
contents: "<a href='http://www.google.com' target='_blank'>Open Google</a>"
});
isc.IButton.create({
title: "Show Window",
top: 35,
left: 75,
click : function () {
touchButton.setTitle("Can't Touch This");
modalWindow.show();
}
});
isc.Window.create({
ID: "modalWindow",
title: "Modal Window",
autoSize:true,
autoCenter: true,
isModal: true,
showModalMask: true,
autoDraw: false,
closeClick : function () { touchButton.setTitle('Touch This'); this.Super("closeClick", arguments)},
items: [
isc.DynamicForm.create({
autoDraw: false,
height: 48,
padding:4,
fields: [
{name: "field1", type: "select", valueMap: ["foo", "bar"]},
{name: "field2", type: "date"},
{type: "button", title: "Done",
click: "modalWindow.hide();touchButton.setTitle('Touch This')" }
]
})
]
});
我担心以下代码:
fields: [
{name: "field1", type: "select", valueMap: ["foo", "bar"]},
{name: "field2", type: "date"},
{type: "button", title: "Done",
click: "modalWindow.hide();touchButton.setTitle('Touch This')" }
]
谁能告诉我这是什么类型的代码? MooTools 或 jQuery 中是否有类似的功能? 我对这些事情不以为然。请帮忙。提前谢谢你。
【问题讨论】:
标签: jquery mootools smartclient