HTML DOM Input Month autofocus প্রপার্টি
HTML DOM input month autofocus প্রপার্টি পেজ লোড হলে ইনপুট মাস ফিল্ডটি অটোফোকাস পাবে কিনা তা ফেরত দেয় এবং পরিবর্তন করে।
সিনট্যাক্স
নিচে সিনট্যাক্স দেওয়া হলো:
১. autofocus ফেরত দেওয়া
object.autofocus
২. autofocus পরিবর্তন করা
object.autofocus = true | false
উদাহরণ
HTML DOM input month autofocus প্রপার্টির উদাহরণ:
<!DOCTYPE html> <html> <head> <title>HTML DOM autofocus property</title> <style>
body{ text-align:center; }
p{ font-size:1.5rem; color:#ff8741; }
input{}
button{ background-color:#db133a; color:#fff; padding:8px; border:none; width:120px; margin:0.5rem; border-radius:50px; outline:none; cursor:pointer; }
</style> </head> <body>
<h1>autofocus Property Example</h1>
<p>Hi! click on disable button to disable autofocus</p>
<input type="month" autofocus value="2019-03">
<br>
<button onclick="disable()">Disable</button>
<script>
function disable() {
document.querySelector("input").autofocus = false;
}
</script> </body> </html>
আউটপুট
এটি নিচের আউটপুট তৈরি করবে:

"Disable" বাটনে ক্লিক করলে মাস ইনপুট ফিল্ডের অটোফোকাস ডিসেবল হবে।
