HTML Articles

Page 132 of 151

Include information about the document in HTML

Prabhas
Prabhas
Updated on 27-May-2020 251 Views

Use the tag to include information about the document. The HTML tag is used for indicating the head section of the HTML document. Tags included inside head tags are not displayed in the browser window.ExampleYou can try to run the following code to include information about the document in HTML −           HTML head Tag               This is demo text.    

Read More

How to search and display the pathname part of the href attribute of an area with JavaScript?

Vrundesha Joshi
Vrundesha Joshi
Updated on 23-May-2020 181 Views

To get the pathname part of the href attribute of an area in JavaScript, use the pathname property.ExampleYou can try to run the following code to display the pathname part.                                                var x = document.getElementById("myarea").pathname;          document.write("Pathname: "+x);          

Read More

How to search the alternate text of an image-map area in JavaScript?

Sravani S
Sravani S
Updated on 23-May-2020 193 Views

To search the alternate (alt) text of an image-map area in JavaScript, use the alt property. You can try to run the following code to get the alternate text.Example                                                      var x = document.getElementById("myarea").alt;          document.write("Alternate Text: "+x);          

Read More

How to search the value of the type attribute of a link in JavaScript?

Jennifer Nicholas
Jennifer Nicholas
Updated on 23-May-2020 242 Views

To search the value of the type attribute of a link in JavaScript, use the type property. You can try to run the following code to get the value of type attribute.Example           Qries                var x = document.getElementById("qriesid").type;          document.write("Value of the type attribute: "+x);          

Read More

What will happen when { } is converted to String in JavaScript?

Arushi
Arushi
Updated on 23-May-2020 174 Views

Use the String() method in JavaScript to convert to String. You can try to run the following code to learn how to convert { } to String in JavaScript. Example       Convert {} to String          var myVal = {};      document.write("String: " + String(myVal));       

Read More

How [ ] is converted to Boolean in JavaScript?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 23-May-2020 198 Views

Use the Boolean() method in JavaScript to convert to Boolean. You can try to run the following code to learn how to convert [ ] to Boolean in JavaScript. Example           Convert [] to Boolean                  var myVal = [];           document.write("Boolean: " + Boolean(myVal));           

Read More

How -Infinity is converted to Boolean in JavaScript?

Jai Janardhan
Jai Janardhan
Updated on 23-May-2020 237 Views

Use the Boolean() method in JavaScript to convert to Boolean. You can try to run the following code to learn how to convert -Infinity to Boolean in JavaScript. Example           Convert -Infinity to Boolean                 var myVal = -Infinity;          document.write("Boolean: " + Boolean(myVal));           

Read More

How [ ] is converted to String in JavaScript?

Swarali Sree
Swarali Sree
Updated on 23-May-2020 212 Views

Use the String() method in JavaScript to convert to String. You can try to run the following to learn how to convert [ ] to String in JavaScript. Example       Convert [] to String          var myVal = [];      document.write("String: " + String(myVal));       

Read More

What is the role of screenX Mouse Event in JavaScript?

Anjana
Anjana
Updated on 23-May-2020 200 Views

When an event is triggerd, the screenX mouse event returns the horizontal coordinate of the mouse pointer.ExampleYou can try to run the following code to learn how to implement screenX Mouse event in JavaScript.           Click here to get the x (horizontal) and y (vertical) coordinates of the mouse pointer.                function coordsFunc(event) {             var x_coord = event.screenX;             var y_coord = event.screenY;             var xycoords = "X coords= " + x_coord + ", Y coords= " + y_coord;             document.write(xycoords);          }          

Read More

What is the role of pageX Mouse Event in JavaScript?

Krantik Chavan
Krantik Chavan
Updated on 23-May-2020 407 Views

When a mouse event is triggered, the pageX mouse event property is used to get the horizontal coordinate of the mouse pointer. The coordinate is relative to the screen.ExampleYou can try to run the following code to learn how to implement pageX Mouse event in JavaScript.                    Click here to get the x (horizontal) and y (vertical)          coordinates of the mouse pointer.                        function coordsFunc(event) {             var x_coord = event.pageX;             var y_coord = event.pageY;             var xycoords = "X coords= " + x_coord + ", Y coords= " + y_coord;             document.write(xycoords);          }          

Read More
Showing 1311–1320 of 1,508 articles
« Prev 1 130 131 132 133 134 151 Next »
Advertisements