The spinner control is added to the HTML5 number input field to increase or decrease the input value. The arrows can be easily removed from the number field with CSS. Use ::-webkit-inner-spin-button and ::-webkit-outer-spin-button Pseudo-elements to hide arrows from number input field using CSS.

By: CodexWorld Aug 13, 2019

The keyCode property of the KeyboardEvent helps to track the key press on the keyboard using JavaScript. You can easily trigger a button by the Enter key press using JavaScript. Use KeyboardEvent keyCode property to trigger button click for submitting form or input field value with JavaScript.

By: CodexWorld Jun 28, 2019
PHP

The preg_match() function is the best option to extract text between HTML tags with REGEX in PHP. If you want to get content between tags, use regular expressions with preg_match() function in PHP. You can also extract the content inside element based on class name or ID using PHP.

By: CodexWorld May 21, 2019

If you use jQuery click like event in the Ajax loaded content, it will not work in a normal scenario. The jQuery events need to be bind properly in the dynamic content loaded by the Ajax request. Use jQuery delegation to attach an event in the dynamically created content by Ajax.

By: CodexWorld Dec 6, 2021
PHP

Password strength validation is very useful to check whether the password is strong. Strong password makes the user’s account secure and helps to prevent account hack. Using Regex (Regular Expression), you can easily validate the password strength in PHP. Use preg_match() function with Regular Expression to validate password strength in PHP.

By: CodexWorld Jan 6, 2022

Generally, the jQuery toggle() method is used to show and hide the HTML element on the web page. But if you don’t want to use the jQuery library, the toggle effect can be easily added using JavaScript. Using JavaScript you can check the visibility of an element and show/hide the HTML element based on their visibility.

By: CodexWorld Feb 28, 2019

The placeholder displays a short hint of the expected value of an input field. It helps the user to know about the format of the input before enting a value. Using the placeholder attribute, you can add a placeholder text to HTML input field. The placeholder text color can be changed using the ::placeholder selector in CSS.

By: CodexWorld Feb 25, 2019

When you want the full name input from the user, the input value must be checked whether the user provides a valid name (first name and last name). Using JavaScript, the full name validation can be easily implemented in the form to check whether the user provides their first name and last name. Use JavaScript test() method with Regular Expression to validate first name and last name.

By: CodexWorld Apr 15, 2023

When you working with the image dimensions, it’s always recommended to get the real width and height of the image. The naturalWidth and naturalHeight property provide an easy way to retrieve the original dimensions of the image using JavaScript. You can easily get the original size (width and height) of the image using JavaScript.

By: CodexWorld Feb 18, 2019
keyboard_double_arrow_up