
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 2202 Articles for HTML

197 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);

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

150 Views
Use window.outerWidth and window.outerHeight event in JavaScript to get the size of windows when the browser is resized.ExampleYou can try to run the following code to work with events to check the browser window size − function resizeFunction() { var val = "Window Width=" + window.outerWidth + ", Window Height=" + window.outerHeight; document.getElementById("test").innerHTML = val; } Resize browser window and check the window (browser window) height and width again.

243 Views
Use the parseInt() method in JavaScript to return an integer after parsing a string. You can also set the numeral system as a second parameter.ExampleYou can try to run the following code to learn how to work with parseFloat() method in JavaScript. var val1 = parseInt("20.50"); var val2 = parseInt("30 minutes"); var val3 = parseInt("20",16); document.write(val1); document.write(""+val2); document.write(""+val3);

186 Views
Use the parseFloat() method in JavaScript to return a floating point number after parsing a string.ExampleYou can try to run the following code to learn how to work with parseFloat() method in JavaScript. var val1 = parseFloat("2"); var val2 = parseFloat("30 minutes"); document.write(val1); document.write(""+val2);

106 Views
Use the Boolean() method in JavaScript to convert to Boolean. You can try to run the following code to learn how to convert [50, 100] to Boolean in JavaScript.ExampleLive Demo Convert [50,100] to Boolean var myVal = [50,100]; document.write("Boolean: " + Boolean(myVal));

180 Views
Use the copyWithin() method in JavaScript to copy array elements. You can set the index from/to where (index) the elements are copied. The following are the elements supported by JavaScript.target − The position of the index from where the elements is to be copied.begin − The index to start copying the element. This is an optional parameter.end − The index to end copying the element. This is an optional parameter.ExampleYou can try to run the following code to learn how to work with copyWithin() method in JavaScript. var num ... Read More

153 Views
The altkey property is used to show whether ALT key is pressed or not when key event was triggered.ExampleYou can try to run the following code to learn how to implement altKey property in JavaScript. Press any key function funcAltKey(event) { var val = document.getElementById("res"); if (event.altKey) { val.innerHTML = "ALT key: Pressed"; } else { val.innerHTML = "ALT key: NOT Pressed"; } }