0
두 개의 다른 버튼이 있습니다. 둘 다 클릭 할 때 JQuery 함수 'ShowCommentBox'가 실행됩니다. 두 번째 버튼을 클릭하면 'ShowCommentBox'와 함께 추가 JQuery 함수를로드하려고합니다.이 함수는 화면에 추가 옵션을 허용합니다.2 개의 버튼에는 추가 기능이 있습니다
<input id="SubmitCommentsForBOQ" type="button" value="Comments" onclick="ShowCommentBox('<%: item.ItemCode %>'')" />
위 나는 또한 눈에 보이는 추가 기능을 만드는
$("#SubmitCommentsForTwo").click(function() {
$("#hiddenBox").show();
});
을 실행하려면 두 번째 버튼은 내가이 작업을 수행 할 수있는 방법입니다 ...? 대화 상자를
function ShowCommentBox(itemIdentifier, labourOrPlant, desc) {
id = itemIdentifier;
LabouringOrPlanting = labourOrPlant;
description = desc;
Function.DisplayBox(itemIdentifier);
$("#LabourOrPlantDialog").dialog({ modal: true });
}
을로드하고 내 다른 코드 :
는 아래 원래 JQuery와입니다 답변 주셔서 감사합니다<div id="LabourOrPlantDialog" title="Comments" style="display:none;">
<table class="detailstable FadeOutOnEdit">
<tr>
<th>Item</th>
</tr>
<tr>
<td id="Item"></td>
</tr>
</table>
<br />
<textarea id="ExistingComments" type="text" runat="server" rows="7" cols="30"
maxlength="2000"> </textarea>
<input id="SubmitComment" type="button" value="Submit"
onclick="SubmitButton()" />
<br />
<div id="hiddenBox">
<input type="text" name="BoqTextBox" id="BoqTextBox" value="7.15" />
</div>
</div>
두 개의 다른 버튼이있는 경우 두 번째 버튼의 onclick 기능을 변경하지 않는 이유는 무엇입니까? 그들은 두 개의 분리 된 DOM 요소입니다. 맞습니까? – antinescience