Placeholder Attribute in HTML

Learn how to write a short hints in the input fields for user understanding when filling any application. Placeholder Attribute in HTML- Placeholder is an attribute that places in the input html tage for example <input placeholder=”text”> text Specifies a short hint that describes the expected value of theinput field Placeholder Describes a short hint … Read more Placeholder Attribute in HTML

disable right click on web page

Learn how to disable right click on web page using Java script with example program Note: Click is a mouse event which we want to disable. below is the syntax for addEventListener() Method syntax document.addEventListener(event, function) Parameters: event: It specifies name of the event. It is a mandatory parameter. event name should in string format(double … Read more disable right click on web page

Disabling cut-copy-paste content for a HTML input control

Learn how to disable cut-copy-paste content for a input control using Java script. Note: Mostly we use Input textboxes for cut the content,copy the content and paste the content. The oncut,oncopy,onpaste event is mostly used on elements with type=”text”. The oncut event occurs when the user cuts the content of an element. The oncopy event … Read more Disabling cut-copy-paste content for a HTML input control

Print 1 to n without using loops in Java Script

Program example to print 1 to n without using loops in Java Script. Learn how to write a program to print 1 to n using recursive functions. A function which called itself is called a recursive function. Example function fun1() { fun1(); // calling fun1() function within the function fun1 } Input: Enter the value … Read more Print 1 to n without using loops in Java Script

Getting Input from User / Keyboard in Java Script

Getting Input from User / Keyboard in Java script – Learn how to get input from user / keyboard like int, string and double data types etc in Java Script program. Example of taking integer / string input using prompt method in Java Script. To get the input from user, we use predefined prompt method. … Read more Getting Input from User / Keyboard in Java Script

Arithmetic operations using dropdown selection

Learn how to write a Java script Program to perform Arithmetic operations using Drop down selection. Arithmetic Operations: +,-,/,*,% Steps: Enter the first value in the first text box. Enter the second value in the second text box. Select the Operator from the Drop Down List. Result Will be displayed on third text box (Read … Read more Arithmetic operations using dropdown selection