Found 10483 Articles for Web Development

HTML onwheel Event Attribute

AmitDiwan
Updated on 26-Sep-2019 09:03:14

121 Views

The HTML onwheel event attribute is triggered when the user moves the wheel of the mouse on an HTML element in an HTML document.SyntaxFollowing is the syntax −ContentLet us see an example of HTML onwheel event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .wheel {       border: 2px solid #fff;       padding: 10px;    } HTML onwheel Event ... Read More

HTML ontoggle Event Attribute

AmitDiwan
Updated on 26-Sep-2019 09:00:12

185 Views

The HTML ontoggle event attribute is triggered when a user opens or closes the HTML element in an HTML document.SyntaxFollowing is the syntax −ContentLet us see an example of HTML ontoggle event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    } HTML ontoggle Event Attribute Demo Hi! I'm summary element This is a paragraph with some dummy content.    function toggleFn() ... Read More

HTML onselect Event Attribute

AmitDiwan
Updated on 26-Sep-2019 08:57:54

177 Views

The HTML onselect event attribute is triggered when a user selects some text of an HTML element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onselect event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    textarea {       border: 2px solid #fff;       background: transparent;       padding: 10px;    }    ::placeholder {   ... Read More

HTML onsearch Event Attribute

AmitDiwan
Updated on 26-Sep-2019 08:53:54

128 Views

The HTML onsearch event attribute is triggered when a user hit “Enter” key in an HTML input element with type=”text” in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onsearch event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    input {       border: 2px solid #fff;       background: transparent;       height: 2rem;       ... Read More

HTML onscroll Event Attribute

AmitDiwan
Updated on 26-Sep-2019 08:50:33

229 Views

The HTML onscroll event attribute is triggered when an HTML element is scrolled by using its scrollbar in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onscroll event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .box-para {       border: 2px solid #fff;       padding: 10px;       width: 200px;       height: 200px;   ... Read More

HTML onsubmit Event Attribute

AmitDiwan
Updated on 26-Sep-2019 08:47:37

421 Views

The HTML onsubmit event attribute is triggered when the form is submitted in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onsubmit event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    textarea {       border: 2px solid #fff;       background: transparent;       font-size: 1rem;    }    ::placeholder {       color: #000;   ... Read More

HTML onreset Event Attribute

AmitDiwan
Updated on 22-Jun-2020 08:37:55

120 Views

The HTML onreset event attribute is triggered when the form is reset in an HTML document.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML onreset event Attribute − Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    textarea {       border: 2px solid #fff;       background: transparent;       font-size: 1rem;    }    ::placeholder {       color: #000;   ... Read More

HTML onresize Event Attribute

AmitDiwan
Updated on 26-Sep-2019 07:26:46

120 Views

The HTML onresize attribute is triggered when user resize the browser window.SyntaxFollowing is the syntax −Let us see an example of HTML onresize event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       padding: 20px;    } HTML onresize Event Attribute Demo Now resize the browser window    function resizeFn() {       document.body.style.background = 'linear-gradient(45deg, #8BC6EC 0%, #9599E2 100%) no-repeat';    } OutputNow resize the browser window to observe how onresize event attribute works.

HTML onpaste Event Attribute

AmitDiwan
Updated on 26-Sep-2019 07:22:51

244 Views

The HTML onpaste attribute is triggered when user paste some content in an HTML element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onpaste event Attribute −Example Live Demo    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    p {       border: 2px solid #fff;       padding: 8px;       text-align: justify;    }    textarea {       ... Read More

How to update a MySQL column by subtracting a value with some conditions?

AmitDiwan
Updated on 24-Sep-2019 12:49:00

930 Views

Let us first create a table −mysql> create table DemoTable (    Score int ); Query OK, 0 rows affected (0.65 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(45); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable values(29); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable values(56); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable values(24); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable values(32); Query OK, 1 row affected (0.09 sec)Display all records from the table using select statement −mysql> select ... Read More

Advertisements