通过本文主要向大家介绍了JQuery,自定义对话框等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
为了得到更丰富的自定义对话框功能,于是用JQuery编写了一个对话框插件;只需简单地引用相关JavaScript就能得到丰富的自定义对话框功能。
插件功能特点:
允许通过CSS进行外观控制。
可以任意把面页的元素作为对话框显示。
当对话框激活时,对话框外的任何元素不能接受鼠标操作。
对话框可以在工作区范围内任意移动,根据工作区大小自适应居中功能。
并不需要编写复杂的JavaScript,通过简单HTML属性描述即可。
经过测试插件可以在Firefox和IE下正常工作。
简单使用描述:
引用JQuery和对话框插件文件:
<script src=jquery-latest.js></script>
<script src=messageBox.js></script>
定义相关按钮为行:
<input id=”Button4″ type=”button” value=”提问对话框“ showoption=”control:test2;width:220;height:120;title:对话框” />
定义相关对话框显示的内容:
<div id=”test2″ style=”display:none”>
<table style=”width: 200px”>
<tr>
<td >
JQuery模式对话框插件好用吗?</td>
</tr>
<tr>
<td align=”right” >
<input id=”Button2″ onclick=”CloseMessageBox()” type=”button” value=”是” />
<input id=”Button6″ onclick=”CloseMessageBox()” type=”button” value=”否” /></td>
</tr>
</table>
</div>
messageboxscript.rar
插件功能特点:
允许通过CSS进行外观控制。
可以任意把面页的元素作为对话框显示。
当对话框激活时,对话框外的任何元素不能接受鼠标操作。
对话框可以在工作区范围内任意移动,根据工作区大小自适应居中功能。
并不需要编写复杂的JavaScript,通过简单HTML属性描述即可。
经过测试插件可以在Firefox和IE下正常工作。
简单使用描述:
引用JQuery和对话框插件文件:
<script src=jquery-latest.js></script>
<script src=messageBox.js></script>
定义相关按钮为行:
<input id=”Button4″ type=”button” value=”提问对话框“ showoption=”control:test2;width:220;height:120;title:对话框” />
定义相关对话框显示的内容:
<div id=”test2″ style=”display:none”>
<table style=”width: 200px”>
<tr>
<td >
JQuery模式对话框插件好用吗?</td>
</tr>
<tr>
<td align=”right” >
<input id=”Button2″ onclick=”CloseMessageBox()” type=”button” value=”是” />
<input id=”Button6″ onclick=”CloseMessageBox()” type=”button” value=”否” /></td>
</tr>
</table>
</div>
messageboxscript.rar