問題内部サーバーエラーがエラー与える:提出は、私がどの以下のようにフォームを介してデータを提出しようとしています
echo 'The # here does not begin a comment.'
echo The \# here does not begin a comment.
しかし、我々は以下のように提出した場合、それは文句を言わない、エラーを与える:ある
echo The # here does not begin a comment.
echo The # here does not begin a comment.
一重引用符とスラッシュを使用せずに、データを送信できません。
コード以下の通り:
function AjaxCallOnClick(userName, email, commentText, blogID, commentHtml, onCommentEmailID) {
var parameters = "{'commentUserName':'" + userName + "','email':'" + email + "','commentText':'" + commentText + "','blogID':'" + blogID + "','commentHtml':'" + commentHtml + "','onCommentEmailID':'" + onCommentEmailID + "'}";
$.ajax({
type: "POST",
url: "<%= ResolveUrl("~/BlogService.asmx/GetShareStoryData")%>",
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
alert("Your Comment was Saved");
var getCommentList = response.d;
var allComments = '';
$('#dvMainAndReplyCommentSection').html('');
$.each(getCommentList, function (index, comments) {
var comment = comments.HtmlComment;
allComments += comment;
});
if (allComments) {
$('#dvMainAndReplyCommentSection').html(allComments);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert(errorThrown);
},
failure: function (response) {
alert(response.responseText);
}
});
}
このため周りの仕事は何ですか?
オブジェクト 'パラメータ'を定義するのに '' "は必要ありません。 –
しかし、現在、このタイプのテキストをフィールドに入れていますが、スラッシュはどうですか?それも受け入れていない。 – Vikash
以下のコードを試しましたか? –