How-to articles, tricks, and solutions about INPUT

How to Create Search Boxes

Create and style beautiful search boxes without any JavaScript code. Learn the steps to create search boxes and find lots of examples in this tutorial.

How to Customize File Inputs

It is possible to customize the file input using a <label>. In this snippet, you’ll find the way of customizing the file input without using any JavaScript.

How to disable input conditionally in Vue.js

In this short Vue.js tutorial, you will read and learn about a very easy and fast method of disabling the HTML input conditionally in Vue.js components.

How to Disable Text Selection, Copy, Cut, Paste and Right-click on a Web Page

Learn the ways of how to disable text selection highlighting, how to disable copy, cut and paste, how to disable right-click. See example with CSS, JavaScript and jQuery.

How to Disable the Browser Autocomplete and Autofill on HTML Form and Input Fields

Learn how to prevent browsers auto filling the input fields of HTML forms. Use autocomplete="off" to specify that autocomplete is disabled. See examples.

How to Disable the Resizing of the <textarea> Element?

Use the CSS3 resize property with its "none" value to disable the resizing function of the textarea element. Learn the ways of only vertically or horizontally resizing, too.

How to get the user input in Java?

To get user input in Java, you can use the Scanner class. Here's an example of how to get a string input from the user:

How to Get the Value of Selected Option in a Select Box

Read the tutorial and learn the methods of getting the value of the selected option in a select box using jQuery. Read about the text() and val() methods.

How to Get the Value of Text Input Field Using JavaScript

Read this tutorial and learn about several methods of getting the value of the input textbox value without wrapping the input element inside a form element.

How to Hide the HTML5 Number Input’s Arrow Buttons

In this tutorial, you will read and learn several methods that are used to hide HTML5 arrow buttons from the number input with the help of CSS properties.

How to Know which Radio Button is Selected using jQuery

Read this JavaScript tutorial and learn the method of getting the value of the selected radio button with the help of jQuery. Copy the code right away.

How to Make Button onclick in HTML

If you want to make a button onclick, you need to add the onclick event attribute to the <button> element. Learn How to Make Button Onclick with Examples.

How to Make the Content of Input Start from the Right

Sometimes, you may need to make the content (such as a text or number) of input start from the right. Read and find out what properties to use for that.

How to Make the Text Input Non-Editable

In this snippet, you can find two methods of making a text input non-editable. Use either the HTML “readonly” attribute or add the CSS pointer-events property.

How to Match an Empty Input Box with CSS

It is possible to match an empty input box only if the input field is required. In this snippet, we’ll show how to do this using the CSS :valid pseudo-class.

How to Remove and Style the Border Around Text Input Boxes in Google Chrome

Use outline: none to remove the ugly border color for a form field in Chrome. Learn also how to give your own style for showing that the box is active. All with examples.

How to Reset File Input with jQuery

In this tutorial, you will read and learn useful information about the fastest method of resetting a file input by using some HTML and jQuery methods.

How to Select All Text in HTML Text Input When Clicked Using JavaScript

Read the tutorial and learn the two methods of selecting the entire text in HTML text input when clicked using JavaScript code snippets. Also, see examples.

How to set a class attribute to a Symfony2 form input

In Symfony2, you can set the class attribute of a form input by using the "attr" option in the form field configuration.

How to Set a Minlength Validation in HTML5

In this snippet, find out what alternative attributes to minlength can be used to set a minlength validation in HTML5. Read our snippet and try examples.

How to Set Default HTML Form Focus Without Javascript

In this tutorial, you’ll see how to set the default HTML form focus. This can be done without Javascript. For that, use the HTML “autofocus” attribute.

How to Set the Checkbox Size with HTML and CSS

Learn 2 methods of how to specify the size of a checkbox and have a larger size checkbox. Use width and height properties or the transform property. See examples.

How to Style a Checkbox with CSS

Checkbox is one of the HTML forms used on every website, but mostly they are not styled and look the same. If you want to make your site more attractive for users, you can simply style your checkboxes. If you don’t know how to do that, now we will create

How to Style Buttons with CSS

Nice and attractive buttons can fill the overall look of your website. Learn how to create and style buttons with the help of CSS. Also, see lots of examples!

How to Style Comment Box Using CSS

Style comment boxes, change the background color, add a background image or set borders to your comment box. See all with examples.