Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.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
Javascript 为什么我的ASP.NET按钮控件没有触发JQuery对话框_Javascript_C#_Jquery_Asp.net_Jquery Ui - Fatal编程技术网

Javascript 为什么我的ASP.NET按钮控件没有触发JQuery对话框

Javascript 为什么我的ASP.NET按钮控件没有触发JQuery对话框,javascript,c#,jquery,asp.net,jquery-ui,Javascript,C#,Jquery,Asp.net,Jquery Ui,首先,该按钮不会启动jquery对话框,并且 当页面加载时,我检查控制台是否有错误,并得到UncaughtTypeError:undefined不是一个指向$dialog.dialog的函数{ 下面是我的代码 Default.aspx <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <

首先,该按钮不会启动jquery对话框,并且 当页面加载时,我检查控制台是否有错误,并得到UncaughtTypeError:undefined不是一个指向$dialog.dialog的函数{

下面是我的代码

Default.aspx

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="JavaScript1.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CustomValidator runat="server" ID="cv1" ControlToValidate="fupCV"     ClientValidationFunction="validate"></asp:CustomValidator>
<asp:FileUpload runat="server" ID="fupCV"/>
<asp:Button runat="server" ID="btnUpload" OnClick="btnUpload_OnClick" Text="Upload"/>
<asp:Button runat="server" ID="btnDialog" OnClientClick="return false;" Text="Open Dialog"/>
</div>
</form>

<div id="dialog" style="display: none">
    This is a popup
</div>
</body>
</html>
.对话框是jQuery UI的一部分,而不是jQuery


我看不到源代码中的任何地方包含jQuery UI。

您也可以使用id结尾,例如:

$('input:submit[id$=btnDialog]')).click(function () {});

谢谢Eric,直截了当、简洁!我没有注意到这一点。
$('input:submit[id$=btnDialog]')).click(function () {});