मैं निम्नलिखित कोड चाहता हूं, ताकि बटन दबाया जा सके, यह पाठ क्षेत्र की सामग्री को नीचे से ऊपर तक स्क्रॉल करता है।<textarea> स्क्रॉल करने के लिए जावास्क्रिप्ट शीर्ष पर वापस
$("button").on("click", function() {
$(document).ready(function() {
var $textarea = $('#update');
$textarea.scrollTop($textarea[0].scrollHeight);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Scroll</button>
<textarea Name="update" Id="update" cols="50" rows="25"></textarea>
[स्क्रॉल jQuery-Textarea के शीर्ष करने के लिए] (https://stackoverflow.com/questions/ 16673159/स्क्रॉल-टू-टॉप-ऑफ-jquery-textarea) | बस '$ textarea.scrollTop ($ textarea [0] .scrollHeight) बदलें; '=>' $ textarea.scrollTop (0); ' – Pedram
' क्लिक 'फ़ंक्शन के अंदर' document.ready' न डालें! – Pedram