javascript - Need cursor at beginning of text in textarea -


मेरे पास यह मेरे शरीर में है और यह काम करता है

  onLoad = 'document.forms। Post.message.focus () ' 

लेकिन मुझे अंत में नहीं, किसी भी मौजूदा पाठ की शुरुआत में टेक्स्टरिए में रखा जाने वाला कर्सर चाहिए यह अंत में रखता है।

ध्यान दें कि मुझे जावास्क्रिप्ट के बारे में कुछ भी नहीं पता है, इसलिए कोमल हो।

धन्यवाद

<पूर्व> फ़ंक्शन चालन करेंटॉस्टर्ट (एल) {if (el.selectionStart ==" number ") (el.selectionStart ==" number ") {el.selectionStart = el.selectionEnd = 0; } और अगर (टाइपओ एल.क्रेडिटटेक्स्टरेन्ज! = "अपरिभाषित") {el.focus (); Var श्रेणी = el.createTextRange (); range.collapse (सही); range.select (); }} MoveCaretToStart (document.forms ["post"]। तत्व ["संदेश"]);

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -