How to check whether a NaN is a NaN or not in JavaScript?

vineeth.mariserla
Published on 16-Jul-2019 16:20:27
NaN is the only value that is not equal to itself. If we check other values, they are equal to themselves but the value NaN is not equal to itself.Example-1Live Demo<html> <body>    <script>       var val = 54/"the";       document.write(val);       document.write("</br>");       if(val ... Read More

HTML DOM Input Button form Property

Sharon Christine
Published on 16-Jul-2019 16:15:56
The HTML DOM input button form property returns the reference of the form which enclose the input button.SyntaxFollowing is the syntax −object.formExampleLet us see an example of input button form property − Live Demo<!DOCTYPE html> <html> <head> <title<HTML DOM form Property</title< <style>    body{       text-align:center;    }   ... Read More

HTML DOM Input Button disabled Property

Sharon Christine
Published on 16-Jul-2019 16:12:04
The HTML DOM input button disabled property returns and alter the value of disabled attribute of an input button in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.disabled2. Modifying nameobject.disabled = true|falseExampleLet us see an example of disabled property − Live Demo<!DOCTYPE html> <html> <head> <title>HTML DOM disabled Property</title> <style>    body{ ... Read More

HTML DOM Input Button name Property

karthikeya Boyini
Published on 16-Jul-2019 16:07:53
The HTML DOM name property returns and alter the value of name attribute of an input button in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.name2. Modifying nameobject.name=”text”Here, “text” represents the new name of the input button.ExampleLet us see an example of name property − Live Demo<!DOCTYPE html> <html> <head> <title>HTML DOM ... Read More

HTML DOM Input Button value Property

karthikeya Boyini
Published on 16-Jul-2019 15:58:46
The HTML DOM value property returns and modify the content of the value attribute of input button.SyntaxFollowing is the syntax −1. Returning valueobject.value2. Modifying valueobject.value=”text”ExampleLet us see an example of value property Live Demo<!DOCTYPE html> <html> <head> <title>HTML DOM value Property</title> <style>    body{       text-align:center    }   ... Read More

HTML DOM Input Button type Property

karthikeya Boyini
Published on 16-Jul-2019 15:54:54
The HTML DOM input button type property returns the type of the input button i.e. whether it is of “button”, “submit” or “reset” type.SyntaxFollowing is the syntax −object.typeExampleLet us see an example of input button type property − Live Demo<!DOCTYPE html> <html> <head> <title>HTML DOM type Property</title> <style>    body{   ... Read More

HTML DOM innerText Property

karthikeya Boyini
Published on 16-Jul-2019 15:48:54
The HTML DOM innerText property returns and allow us to modify inner text content of an HTML element.SyntaxFollowing is the syntax −1. Returning inner textobject.innerText2. Setting inner textobject.innerText=”text”ExampleLet us see an example of innerText property − Live Demo<!DOCTYPE html> <html> <head> <style>    body{       text-align:center;    }   ... Read More

HTML DOM innerHTML Property

Sharon Christine
Published on 16-Jul-2019 15:44:22
The HTML DOM innerHTML property returns and allow us to modify inner HTML of an element. The inner HTML is the content.SyntaxFollowing is the syntax −1. Returning innerHTMLobject.innerHTML2. Setting inner HTMLobject.innerHTML=”value”Here, “value” represents the content or nested HTML elements.ExampleLet us see an example of innerHTML property − Live Demo<!DOCTYPE html> <html> ... Read More

HTML DOM id Property

Sharon Christine
Published on 16-Jul-2019 15:37:22
The HTML DOM id property returns and allow us to set id of an HTML element.SyntaxFollowing is the syntax −1. Returning idobject.id2. Setting idobject.id=”value”Here, “value” represents the id of an element.ExampleLet us see an example of id property − Live Demo<!DOCTYPE html> <html> <head> <style>    p{       background-color:#347924; ... Read More

HTML DOM paddingLeft Property

Sharon Christine
Published on 16-Jul-2019 15:27:55
The HTML DOM paddingLeft property returns and add left padding to an HTML element.SyntaxFollowing is the syntax −1. Returning left paddingobject.style.paddingLeft2. Adding left paddingobject.style.paddingLeft=”value”ValuesHere, “value” can be the following −ValueDetailslengthIt defines value padding in length unit.initialIt defines padding to its default value.inheritIn this padding gets inherited from its parent element.percentage(%)It ... Read More
Advertisements