- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2416 Articles for HTML
102 Views
To convert a string to lowercase letters in JavaScript, use the toLocaleLowerCase() method.ExampleYou can try to run the following code to learn how to work with toLocaleLowerCase() method in JavaScript −Live Demo var a = "WELCOME!"; document.write(a.toLocaleLowerCase());
521 Views
To find carriage return character with JavaScript Regular Expression, use the following −\rExampleYou can try to run the following code to find a carriage return character. It returns the position where the carriage return (\r) character is found − JavaScript Regular Expression var myStr = "100% \r Responsive!"; var reg = /\r/; var match = myStr.search(reg); document.write(match);
288 Views
To find a non-whitespace character, use the following −\SExampleYou can try to run the following code to find non-whitespace character − JavaScript Regular Expression var myStr = "100% Responsive!"; var reg = /\S/g; var match = myStr.match(reg); document.write(match);
5K+ Views
In this tutorial, we will learn to convert Unicode values to characters in JavaScript. The Unicode values are the standard values for the character, and users can encode them to convert them into characters. For example, ‘A’ is a Unicode character whose value is 65 according to the ASCII (American standard code for information interchange) table. In the same way, all alphabets, numbers, and other characters have particular Unicode values. We will learn to identify the Unicode character from its values using JavaScript. Using the fromCharCode() Method In JavaScript, the string library contains the fromCharCode() method, which takes the decimal ... Read More
217 Views
To find a vertical tab character with JavaScript Regular Expression, use the following −\vExampleYou can try to run the following code to find a vertical tab character. It returns the position where the vertical tab (\v) character is found − JavaScript Regular Expression var myStr = "Secure and \v Responsive!"; var reg = /\v/; var match = myStr.search(reg); document.write(match);
439 Views
In this tutorial, we will learn to check whether a value is a safe integer or not in JavaScript. The simple definition of the safe integer in JavaScript is all numbers we can represent under the IEEE-754 double-precision number. It is the set of all numbers which lie between the -(2^53) to (2^53) exclusive, and we can represent it in the standard way. Here, we have different approaches to checking whether the number is a safe integer. Using the Number.IsSafeInteger() Method Using the if-else Conditional Statement Using the Number.isSafeInteger() Method In JavaScript, the isSafeInteger() method checks that type ... Read More
141 Views
Javascript date setUTCMilliseconds() method sets the milliseconds for a specified date according to universal time.The following is the parameter for setUTCMilliseconds(millisecondsValue) −millisecondsValue − A number between 0 and 999, representing the milliseconds.ExampleYou can try to run the following code to set the milliseconds for a specified date according to universal time − JavaScript setUTCMilliseconds Method var dt = new Date( "Aug 28, 2008 23:30:00" ); dt.setUTCMilliseconds( 1200 ); document.write( dt );
547 Views
In this tutorial, we will see how to find digits (0-9) using JavaScript RegExp. ASCII value for digits [0-9] starts from 48 to 57. If you want to print any ASCII value for a digit, 48 needs to be added to that digit. We denote digits as \d in the regular expression. A RegExp is an object that specifies the pattern used to do a search and replace operations on the string or for input validation. Syntax Following is the syntax for regular expression pattern of digit or \d character − new RegExp("\d") or simply /\d/ /\d/ is ... Read More
168 Views
To find a character except for a newline, use the Metacharacter. (period). You can try to run the following code to find a character −Example JavaScript Regular Expression var myStr = "We provide websites! We provide content!"; var reg = /p.o/g; var match = myStr.match(reg); document.write(match);
78 Views
To match an expression, use the JavaScript match() method. This method is used to retrieve the matches when matching a string against a regular expression. The following is the parameter −param − A regular expression object.If the regular expression does not include the g flag, it returns the same result as regexp.exec(string).If the regular expression includes the g flag, the method returns an Array containing all the matches.ExampleYou can try to run the following code to math an expression using JavaScript Regular Expression − JavaScript String match() Method ... Read More