javascript - set the curser to the beginning of textarea using jquery -


  MyEvent.prototype.sendMessage_ = फ़ंक्शन (इनपुट) {// इनपुट है this.find ('# mytextarea' ); अगर (इनपुट.वल ()। ट्रिम ()! = '') {Input.val (''); $ ( '# Mytextarea') ध्यान केंद्रित ()।; }}; //... एचटीएमएल .... // & lt; textarea type = "text" प्लेसहोल्डर = "यहाँ इनपुट" id = "mytextarea" & gt; & lt; / textarea & gt;   

Jquery के साथ खाली textarea के बाद, कर्सर अभी भी इनपुट के अंत में है, कैसे textarea की शुरुआत में कर्सर को स्थानांतरित कर सकता है?

और दृश्य में मेरे पास है:

$ ('# mytextarea') का उपयोग करने की कोशिश करें। )

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

Installing croogo for cakephp -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -