我想显示 hiddentfield 值
<p style="color: Red">
Please note that you have <span>
javascript:$("input[id$=hdnCartCount]").val();
</span> more pending orders.
<br />
Click Checkout to proceed!
</p>
如何显示?
我想显示 hiddentfield 值
<p style="color: Red">
Please note that you have <span>
javascript:$("input[id$=hdnCartCount]").val();
</span> more pending orders.
<br />
Click Checkout to proceed!
</p>
如何显示?
假设您希望这是动态的,稍微重新排列您的 HTML(注意我给您的 span 的 ID):
<p style="color: Red">
Please note that you have
<span id="pendingOrdersCount"></span>
more pending orders.
<br />
Click Checkout to proceed!
</p>
然后你可以这样做:
<script type="text/javascript">
$(function () {
$("#pendingOrdersCount").text($("input[id$=hdnCartCount]").val());
});
</script>
尝试为跨度和
$("#spanId").text($('#hdnField').val());