javascript - range - how to select new inserted node automatically? -


newNode = document.createElement ("span"); NewNode.innerHTML = 'उदाहरण'; Range.insertNode (newNode);

मैं नया नोड सम्मिलित करता हूँ कोई रास्ता नहीं है, इस नए नोड को स्वचालित रूप से कैसे चुनें (जैसा कि पृष्ठ पर दिखाई देता है, यह चयनित नहीं है)? धन्यवाद।

  श्रेणी। सिक्स नोडसंयंत्र (नया नोड); Var sel = window.getSelection (); sel.removeAllRanges (); sel.addRange (रेंज);  

Comments

Popular posts from this blog

ios - Form Sheet content disappearing -

Lists in scheme -

c++ - an enclosing-function local variable cannot be referenced in a lambda body unless if it is in capture list -