- 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
![Akshaya Akki](https://www.tutorialspoint.com/assets/profiles/13526/profile/60_48621-1512703980.jpg)
81 Views
The source RegExp property in JavaScript is a read-only string property of RegExp objects. It contains the text of the RegExp pattern. This text does not include the delimiting slashes used in regular-expression literals, and it does not include the "g", "i", and "m" attributes.ExampleYou can try to run the following code to learn how to implement source RegExp property in JavaScript − JavaScript RegExp source Property var str = "JavaScript is an interesting scripting language"; var re = new RegExp( "script", "g" ); re.test(str); document.write("The regular expression is : " + re.source);
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
59 Views
Use the screen.availHeight property to return the width of the user’s screen. The result will be in pixels and Taskbar feature won’t be included.ExampleYou can try to run the following code to learn how to work with the screen.availHeight property in JavaScript −Live Demo document.write("Height of the screen: "+screen.availHeight);
![Fendadis John](https://www.tutorialspoint.com/assets/profiles/13534/profile/60_64028-1512539837.jpg)
230 Views
If you want to get the pixels of the document scrolled to from the upper left corner of the window, then use the pageXoffset and pageYoffset property. Use pageYoffset for vertical pixels.ExampleYou can try to run the following code to learn how to work with pageYOffset property in JavaScript.Live Demo div { background-color: green; height: 1500px; width: 1500px; } function scrollFunc() { window.scrollBy(200, 200); alert("Vertical: " + window.pageYOffset); } Scroll
![Priya Pallavi](https://www.tutorialspoint.com/assets/profiles/13562/profile/60_91320-1512544134.jpg)
150 Views
To search a string for a text that matches RegExp, use rhe exec() method in JavaScript. If it finds a match, it returns an array of results; otherwise, it returns null.The following is the parameter −string − The string to be searchedExampleYou can try to run the following code to search a string for text matching RegExp − JavaScript RegExp exec Method var str = "JavaScript is an interesting scripting language"; var re = new RegExp( "script", "g" ); ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
65 Views
Use the screen.availWidth property to return the width of the user’s screen. The result will be in pixels and the Taskbar feature won’t be included.ExampleYou can try to run the following code to learn how to work with the screen.availWidth property in JavaScript −Live Demo document.write("Width of the user’s screen: "+screen.availWidth);
![Manikanth Mani](https://www.tutorialspoint.com/assets/profiles/13524/profile/60_53242-1512705034.jpg)
122 Views
JavaScript date toLocaleString() method converts a date to a string, using the operating system's local conventions.The toLocaleString method relies on the underlying operating system in formatting dates. It converts the date to a string using the formatting convention of the operating system where the script is running. For example, in the United States, the month appears before the date (04/15/98), whereas in Germany the date appears before the month (15.04.98).ExampleYou can try to run the following code to learn how to convert a date to a string using current locale’s conventions − JavaScript toLocaleString Method ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
303 Views
To find a hexadecimal number character with JavaScript Regular Expression, use the following. Add the hexadecimal number here −\xddExampleYou can try to run the following code to find hexadecimal number character. It searches for hexadecimal number 53 i.e. S − JavaScript Regular Expression var myStr = "Secure and Responsive!"; var reg = /\x53/g; var match = myStr.match(reg); document.write(match);
![Alankritha Ammu](https://www.tutorialspoint.com/assets/profiles/13523/profile/60_83090-1512649277.jpg)
226 Views
To match a Unicode character specified by the hexadecimal number xxx with JavaScript Regular Expression, use the following −\uxxxxExampleYou can try to run the following code to match the hexadecimal number character xxxx. It matches the hexadecimal number 53 i.e. S − JavaScript Regular Expression var myStr = "Secure and Responsive!"; var reg = /\u0053/g; var match = myStr.match(reg); document.write(match);
![Ankitha Reddy](https://www.tutorialspoint.com/assets/profiles/13550/profile/60_73963-1512711511.jpg)
186 Views
To find an octal number character with JavaScript Regular Expression, use the following. Add the octal number here − \xxx You can try to run the following code to find an octal number character. It searches for octal number 123 i.e S − Example Live Demo JavaScript Regular Expression var myStr = "Secure and Responsive!"; var reg = /\123/g; var match = myStr.match(reg); document.write(match); Output S
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
158 Views
If you want to get the pixels the document scrolled to from the upper left corner of the window, then use the pageXoffset and pageYoffset property. Use pageXoffset for horizontal pixels.ExampleYou can try to run the following code to learn how to work with pageXOffset property in JavaScript −Live Demo div { background-color: green; height: 1500px; width: 1500px; } function scrollFunc() { window.scrollBy(200, 200); alert("Horizonal: " + window.pageXOffset); } Scroll