这就是我正在做的事情,这是一个粗略的设计,现在我确定它会在我发布时出现。
--------------------------------------------------------------------
first name goes here.....
---------------------------------------------------------------------
datetime buttons
---------------------------------------------------------------------
下面的代码在使用 with时有效,tr
但现在我使用的divs
是我需要放什么,div id
?
<script type="text/javascript">
function OnSave(obj) {
debugger
// Find the row this button is in
var tr = $(obj).closest("tr");
// Get the value from the edit control
var firstNameEdit = tr.find("[id*='firstNameEdit']").val();
// assign value to hidden input
tr.find("[id*='firstNameHidden']").val(firstNameEdit);
var lastNameEdit = tr.find("[id*='lastNameEdit']").val();
tr.find("[id*='lastNameHidden']").val(lastNameEdit);
}
</script>
这是我带有 div 的新 html 代码:
<div class='columns'>
<div class='subj'>
<div id="container">
<asp:PlaceHolder runat="server" ID="firstNameEditPlaceholder" />
<input type="hidden" runat="server" id="firstNameHidden" visible="false" />
<br />
<br />
<div id="left"></div>
<!-- left -->
<div id="right"></div>
<!-- right -->
<div class="clear">
</div>
</div>
<!-- container -->
</div>
</div>