我從這個thread學會了如何在一個CONTENTEDITABLE DIV插入元素之後設置插入符。不過,我想阻止軟鍵盤打開。 我已經CONTENTEDITABLE監聽onfocus事件fiddle based on the above thread到的preventDefault/stopPropagation,但沒有奏效。任何建議都會很棒! function insertNodeAtCaret(
Phone:<br>
<input type="text" id="phone" name="phone" placeholder="Please enter your phone number"> The input box looks like this to begin with On click/focus, it looks like this 在鍵入數字值,下劃線應該得到更換或數
jsfiddle link <input id = "focus-ipt" type = "text" value = "nothing" /> var $focusIpt = document.querySelector("#focus-ipt");
$focusIpt.addEventListener("blur", function (e) {
$focusIpt.value =