<code><div
class
=
"row cl"
>
<label
class
=
"form-label col-3"
>测试:</label>
<div
class
=
"formControls col-6"
>
<label><span id=
"OrderTime"
>待修改文字</span>
<input type=
"text"
id=
"OrderTimeInput"
style=
"display:none"
>
</label>
</div>
<input id=
"changeOrderTime"
type=
"button"
value=
"修改"
onclick=
"changeOrderTime()"
>
<button style=
"display:none"
id=
"timeChangeOK"
>确定</button>
<script type=
"text/javascript"
>
function
changeOrderTime(){
var
spanValue = $(
"#OrderTime"
).text();
$(
"#OrderTimeInput"
).val(spanValue);
$(
"#OrderTimeInput"
).show();
$(
"#OrderTime"
).hide();
$(
"#changeOrderTime"
).hide();
$(
"#timeChangeOK"
).show();
}
$(
"#timeChangeOK"
).click(
function
(){
var
inputValue = $(
"#OrderTimeInput"
).val();
$(
"#OrderTime"
).text(inputValue);
$(
"#OrderTimeInput"
).hide();
$(
"#OrderTime"
).show();
$(
"#changeOrderTime"
).show();
$(
"#timeChangeOK"
).hide();
});
</script>
</div></code>