时间:2011-01-06 19:32:00

标签: javascript

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

您可以尝试热门的Prototype JS library。这是你如何在Prototype中做到这一点。几乎所有其他JS库中的想法都非常相似。

<强> HTML:

<div style="display: none" id="message"></div>

<强> CSS:

#message {
 position: absolute;
 left: 40%;
 top: 40%;
}

<强> JS:

function modal(text) {
 $('message').update(text);
 $('message').appear();
}

modal('Any text you want to appear in the modal box');
相关问题