我有這樣的功能:jQuery文檔字符串輸入框
function msj(str) {
// display = document.getElementById("txt"); // DOM
// nodo = document.createTextNode(str);
// display.replaceChild(nodo,display.firstChild);
$("#txt").html(str); // jQuery
}
此處顯示消息:
<div id="txt">Guess the number between 1 and 10</div>
然後,我要顯示的消息轉換爲輸入文本形式。任何人都知道如何做到這一點?
非常感謝。
我知道了!但直到你告訴我們[你試過的東西](http://whathaveyoutried.com/) –