在网上找的jQuery模态窗口插件,使用的时候提示“对象不支持此属性或方法”,按照提示的行号是传参数的地方"trigger: '#ex3aTrigger'"错误,但是我确实引用了jQuery文件和插件文件jqModal.js。在IE下报这个错,但是点击取消调试后,效果是正常显示的,我用了IETester,不管哪个版本的IE都报错,但都可以看到效果。Firework不报错,可以正常使用。
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebLINQ.Index" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.8.1.js" type="text/javascript"></script>
<script src="Scripts/jqModal.js" type="text/javascript"></script> <link href="Styles/jqModal.css" rel="stylesheet" type="text/css" />
<link href="Styles/jqModelStyle.css" rel="stylesheet" type="text/css" /> <script type="text/javascript">
$().ready(function () {
$('#ex3a').jqm({
trigger: '#ex3aTrigger',
overlay: 30,
overlayClass: 'whiteOverlay'
}).jqDrag('.jqDrag');
$('input.jqmdX')
.hover(function () { $(this).addClass('jqmdXFocus'); },
function () { $(this).removeClass('jqmdXFocus'); })
.focus(function () { this.hideFocus = true; $(this).addClass('jqmdXFocus'); })
.blur(function () { $(this).removeClass('jqmdXFocus'); });
}); </script>
</head>
<body>
<form id="form1" runat="server">
<a href="#" id="ex3aTrigger">view</a> (dialog)
...
<div id="ex3a" class="jqmDialog">
<div class="jqmdTL"><div class="jqmdTR"><div class="jqmdTC jqDrag">Dialog Title</div></div></div>
<div class="jqmdBL"><div class="jqmdBR"><div class="jqmdBC"> <div class="jqmdMSG">
Styled windows or dialogs are easy!
<br /><br />
This particular theme was done for <a href="http://www.pommo.org">poMMo</a> --
feel free to borrow the styling, or use it as a reference when creating your own.
CSS and Markup is available under the HTML + CSS tabs of example 3a.
</div> </div></div></div>
<input type="image" src="dialog/close.gif" class="jqmdX jqmClose" />
</div> </form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebLINQ.Index" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.8.1.js" type="text/javascript"></script>
<script src="Scripts/jqModal.js" type="text/javascript"></script> <link href="Styles/jqModal.css" rel="stylesheet" type="text/css" />
<link href="Styles/jqModelStyle.css" rel="stylesheet" type="text/css" /> <script type="text/javascript">
$().ready(function () {
$('#ex3a').jqm({
trigger: '#ex3aTrigger',
overlay: 30,
overlayClass: 'whiteOverlay'
}).jqDrag('.jqDrag');
$('input.jqmdX')
.hover(function () { $(this).addClass('jqmdXFocus'); },
function () { $(this).removeClass('jqmdXFocus'); })
.focus(function () { this.hideFocus = true; $(this).addClass('jqmdXFocus'); })
.blur(function () { $(this).removeClass('jqmdXFocus'); });
}); </script>
</head>
<body>
<form id="form1" runat="server">
<a href="#" id="ex3aTrigger">view</a> (dialog)
...
<div id="ex3a" class="jqmDialog">
<div class="jqmdTL"><div class="jqmdTR"><div class="jqmdTC jqDrag">Dialog Title</div></div></div>
<div class="jqmdBL"><div class="jqmdBR"><div class="jqmdBC"> <div class="jqmdMSG">
Styled windows or dialogs are easy!
<br /><br />
This particular theme was done for <a href="http://www.pommo.org">poMMo</a> --
feel free to borrow the styling, or use it as a reference when creating your own.
CSS and Markup is available under the HTML + CSS tabs of example 3a.
</div> </div></div></div>
<input type="image" src="dialog/close.gif" class="jqmdX jqmClose" />
</div> </form>
</body>
</html>
解决方案 »
- 解决图片全部替换问题。在线等
- history.back(1);在google器中返回页面没有值,而IE返回是有值的
- JS代码在火狐中不兼容,高手帮忙看一下
- onclick中传参的问题!!!
- js怎么让div始终靠窗体右下角
- javascript 如何设置input里的file为只可选择不可输入
- 请问如何用js实现游戏倒计时进度条效果?????
- 有高手写书没有
- 请教:我想锁定弹出窗口,即必须先响应子窗口,子窗口关闭后才能够响应父窗口,javascript可以控制么?如何控制?
- 如何在样式表里使滚动条不可见?
- ExtJs 3.4版本 treepanel 异步加载 5000个节点 界面卡死
- 软件开发“人才荒” 精英人才很吃香
});试试