Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery MsgBox给出错误消息_Jquery_Asp.net - Fatal编程技术网

Jquery MsgBox给出错误消息

Jquery MsgBox给出错误消息,jquery,asp.net,Jquery,Asp.net,我正在尝试从此站点实施MsgBox: 到我的web应用程序。我遵循以下解释: <head> <script type="text/javascript" src="/Timesheets/Java/MsgBox/Scripts/jquery-1.8.0.min.js"></script> <link rel="stylesheet" type="text/css" href="/Timesheets/java/msgbox/styles/msgBoxL

我正在尝试从此站点实施MsgBox:

到我的web应用程序。我遵循以下解释:

<head>
<script type="text/javascript" src="/Timesheets/Java/MsgBox/Scripts/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="/Timesheets/java/msgbox/styles/msgBoxLight.css" />
<script type="text/javascript" src="/Timesheets/Java/MsgBox/Scripts/jquery.msgBox.js"></script>
</head>

<body>
<script>
function sign() {
    $.msgBox("The selection includes process white objects. Overprinting such objects is only useful in combination with transparency effects.");
    /*
    busyBox.Show();
    PageMethods.signe($("#form1").serializeArray(), getParameterByName("pn"), user, signcomp, signfail);
    */
}
</script>

<input type="button" name="okbtn" ID="okbtn" class="mybutton13" value="Test button" onclick="sign()" runat="server" />
</body>

函数符号(){
$.msgBox(“所选内容包括处理白色对象。叠加此类对象仅在与透明度效果结合使用时有用。”);
/*
busyBox.Show();
PageMethods.signe($(“#form1”).serializeArray(),getParameterByName(“pn”),user,signcomp,signfail);
*/
}
但每次单击该按钮时,都会出现一个错误:对象不支持属性或方法“msgbox”消息

谢谢大家的帮助

编辑:

Firefox告诉我:TypeError:$.msgBox不是一个函数


IE提示错误:对象不支持属性或方法“msgBox”

请尝试使用jQuery click()处理程序将msgBox函数附加到按钮,而不是使用按钮标记的onClick属性

还要注意,$.msgBox()将javascript对象作为参数,而不是字符串

<script>
$(document).ready(function() { 
    $('#okbtn').click(function() { 
        $.msgBox({
            title:"Title goes here",
            content:"Content goes here"
        });
    });
});
</script>

$(文档).ready(函数(){
$('#okbtn')。单击(函数(){
$.msgBox({
标题:“标题在这里”,
内容:“内容在这里”
});
});
});

jquery.msgbox演示
$(函数(){
$(“#test1”)。单击(函数(){
新的$.msgbox('Hello world').show();
});
$(“#test2”)。单击(函数(){
新的$.msgbox({
宽度:500,
身高:500,
标题:“你好”,
内容:“你好,世界!”,
不透明度:.8
}).show();
});
$(“#test3”)。单击(函数(){
新的$.msgbox({
allowDrag:false//启用拖放(默认),如果为false则禁用
}).show();
});
$(“#test4”)。单击(函数(){
新的$.msgbox({
onClose:function(){
警报(this.titleWrap.html());//这是指对象本身
}
}).show();
});
$(“#test5”)。单击(函数(){
新的$.msgbox({
自动关闭:10//不倒计时
}).show();
});
$(“#test6”)。单击(函数(){
新的$.msgbox({
自动关闭:0//不倒计时
}).show().startAutoClose(10);//开始倒计时,支持链式操作
});
$(“#test7”)。单击(函数(){
新的$.msgbox({
键入:“警报”,
内容:“你好”
}).show();
});
$(“#test8”)。单击(函数(){
新的$.msgbox({
onClose:function(){alert(this.getValue())},//带有onClose插件
键入:“确认”,
内容:“你好”
}).show();
});
$(“#test9”)。单击(函数(){
新的$.msgbox({
onClose:function(){alert(this.getValue())},
键入:“输入”,
内容:“输入您的文字:”
}).show();
});
$(“#test10”)。单击(函数(){
新的$.msgbox({
//onAjaxed:function(){alert('Loading complete')},
键入:“ajax'、//或url
内容:'http://pwwang.com'
}).show();
});
$(“#test11”)。单击(函数(){
新的$.msgbox({
键入:“iframe”,
内容:'http://pwwang.com'
}).show();
});
$(“#test12”)。单击(函数(){
新的$.msgbox({
动画:1//0,2,没有其他值的动画
}).show();
});
$(“#test13”)。单击(函数(){
新的$.msgbox({
showClose:false//在选项中禁用
}).show();
});
$(“#test14”)。单击(函数(){
新的$.msgbox({
closeIcon:'image:close.gif'//或'text:close',或'image:close.png'显示图像
}).show();
});
$(“#okbtn”)。单击(函数(){
新的$.msgbox({
showClose:false//在选项中禁用
}).show();
});
});   















最后,我制作了自己的弹出框,使用Javascript中的动态内容请求密码。然后我用
msg
替换
$.msgBox
,解决了这个问题。现在它可以正常工作了

$('#okbtn').click(function() { 
msg({
     title:"Title goes here",
     content:"Content goes here",
     type:"Type goes here"
   });
});

我从
jquery.msgBox.js

中获得了
msg
函数,并尝试在相同的结果中添加一个“B”。您确定js include文件
jquery.msgBox.js
被正确包含了吗?文件确实存在于那个位置吗?我用Firefox的源代码点击它,它会给我请求的页面,所以是的,它是可以访问的。
$('#okbtn').click(function() { 
msg({
     title:"Title goes here",
     content:"Content goes here",
     type:"Type goes here"
   });
});