-3
如果我需要使用JavaScript自定義替換「測試測試」消息,應該怎麼做?替換div元素中的文本
<div class="outputmsg_container" style="" id="output_messages"><
button class="btn btn-icon close icon-cross" onclick="GlideUI.get().clearOutputMessages(this); return false;">
<span class="sr-only">Close Messages"</span>
</button>
<div class="outputmsg_div">
<div class="outputmsg outputmsg_error notification notification-error"><img class="outputmsg_image" src="images/outputmsg_error_24.gifx" alt="">
<span class="outputmsg_text">test test</span>
</div>
</div>
</div>
使用'.replace( '替換字符串', '新字符串')'。 – doutriforce
'.innerHTML('new text')' – yuriy636
我已經更新了這個問題,你現在可以查看嗎? –