-1
이 일부 오류가 발생하고,
오류 내 코드는 "JS 프레임 : 자원 : //gre/components/nsPrompter.js :: openTabPrompt : 라인 468 "데이터 : 아니오]캐치되지 않는 예외는
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="loginform.aspx.cs" Inherits="loginform" %>
<!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>Untitled Page</title>
<script src="js/jquery-1.6.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#btnsubmit").click(function(){
$.ajax({
type: "POST",
url: "loginform.aspx/getdataval",
data:"{'uname':'"+$("#TextBox1").val()+"','passwod':'"+$("#TextBox2").val()+"'}",
contentType: "application/json;charset=utf-8",
dataType: "json",
success: function(msg) {
alert("welcome");
AjaxSucceeded(msg);
},
error: AjaxFailed
})
});
});
function AjaxSucceeded(result) {
alert(result.d);
var Emp=result.d;
$("#output").append('<p>'+Emp.Sname+ ' ' + Emp.Sno+'</p>');
}
function AjaxFailed(result) {
alert(result.status + ' ' + result.statusText);
alert("Failure");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<asp:Button ID="btnsubmit" runat="server" Text="Button" />
<div id="output">
</div>
</div>
</form>
</body>
</html>
원인을 찾은 제발 도와주세요하고 코드를 다시 쓰기 .
미리 감사드립니다.
하지 이건 정말 다른 것들 당신은 '('#output ')'전에 $를 놓치고 –
하지만 하드 들여 쓰기없이 읽을하는 문제입니다. –
디버그 용 방화 광을 사용하여 정확히 무슨 일이 일어나는지 찾으십시오. – vikrantx