Skip to main content

Posts

Showing posts from June, 2016

How to toogle element attribute javascript and jquery

For Example Write this Input type in your code <input type="button" id="marqbt" value="Play"/> Add this script in your script file or header or footer file <script> $(function(){$('#marqbt').click(function() {        $(this).val() == "play" ? play_int() : play_pause();     }); }); function play_int() {     $('#marqbt').val("pause");     // do play } function play_pause() {     $('#marqbt').val("play");     // do pause } </script> Now you can change button value when you click on this

How to add attribute in input type onload

Add this script this will target your input type submit and set an attribute on it when page load. <script> function functionAddAttribute(){     $("input:submit").attr("accesskey","g"); }; window.onload = functionAddAttribute; </script> <noscript>Your browser does not support JavaScript!</noscript> This is html <input type="submit" value="this is button" />

How to add attribute in input type onload

Add this script this will target your input type submit and set an attribute on it when page load. <script> function functionAddAttribute(){     $("input:submit").attr("accesskey","g"); }; window.onload = functionAddAttribute; </script> <noscript>Your browser does not support JavaScript!</noscript> This is html <input type="submit" value="this is button" />

How to create shortkey in html file.

We can create a shortcut key in webpage using "accesskey attirbute" For Example:- <a accesskey="u" class="show-pop-up" href="https://www.blogger.com/blogger.g?blogID=687425959590018026#">Show pop up</a> This shortkey work with different key combination on different browser Internet Explorer [Alt] + accesskey N/A Chrome [Alt] + accesskey [Alt] + accesskey [Control] [Alt] + accesskey Firefox [Alt] [Shift] + accesskey [Alt] [Shift] + accesskey [Control] [Alt] + accesskey Safari [Alt] + accesskey N/A [Control] [Alt] + accesskey Opera Opera 15 or newer: [Alt] + accesskey Opera 12.1 or older: [Shift] [Esc] + accesskey

How to create shortkey in html file.

We can create a shortcut key in webpage using "accesskey attirbute" For Example:- <a accesskey="u" class="show-pop-up" href="https://www.blogger.com/blogger.g?blogID=687425959590018026#">Show pop up</a> This shortkey work with different key combination on different browser Internet Explorer [Alt] + accesskey N/A Chrome [Alt] + accesskey [Alt] + accesskey [Control] [Alt] + accesskey Firefox [Alt] [Shift] + accesskey [Alt] [Shift] + accesskey [Control] [Alt] + accesskey Safari [Alt] + accesskey N/A [Control] [Alt] + accesskey Opera Opera 15 or newer: [Alt] + accesskey Opera 12.1 or older: [Shift] [Esc] + accesskey