입력 'pid'속성에 새 값을 설정하려고 시도했지만이 값은 null
이됩니다. HTML에새 속성 값을 입력하는 방법
$(".feauter-product-holder").click(function() {
$("#productsubject").attr("pid", $(this).find("input[type=hidden]").attr("id"));
});
내 코드 :
나는이 JQuery와 코드가
<div class='feauter-product-holder'>
<input type="hidden" id="3">
</div>
<asp:TextBox runat="server" ID="productsubject" pid=""></asp:TextBox></div>
$.ajax({
url: editor.config.saveSubmitURL,//the url to post at... configured in config.js
type: 'POST',
data: { servicename: "savedata", text: data, subject: $("#productsubject").val(), pid: $("input[id$='productsubject").attr("pid") },//editor.name contains the id of the current editable html tag
})
내가 잘못 클래스 사업부를 쓸 수 있지만 내 코드에 정확이 게시물 을 편집 할 수 있습니다. 아약스에서 pid를 호출하면 null이됩니다.
어떻게해야합니까?
'클래스 = '나는 내 게시물 – rps
내가 내 게시물을 업데이 트했습니다 – user3243749