HTML

How To Upload Only Specific Files In Html?

Examples: <form action=””> <input type=”file” name=”custom_files” accept=”.png, .ppt, .jpg, .mp4″> <input type=”submit”> </form>

Posted in: HTML, Solutions

How To Upload Only Audio Files In Html?

Example <form action=””> <input type=”file” name=”audio_file” accept=”audio/*”> <input type=”submit”> </form>

Posted in: HTML, Solutions

How To Upload Only Video Files In Html?

Example: <form action=””> <input type=”file” name=”video” accept=”video/*”> <input type=”submit”> </form>

Posted in: HTML, Solutions

How To Upload Only Image Files In Html?

Example: <form action=””> <input type=”file” name=”pic” accept=”image/*”> <input type=”submit”> </form>

Posted in: HTML, Solutions

How To Bind Multiple Events In JQuery?

Example: <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script> <script> $(document).ready(function() { $(‘button’).on(‘click dblclick’, function(){ $(‘#js’).addClass(‘hilighter’); }); }); </script> <style> .hilighter { background-color:yellow } </style> </head> <body> <p> Jquery is a library of <span id=”js”>JavaScript. </span></p> <br> <button> Click me or Double click </button> </html> </body> </html>

Posted in: HTML, jQuery, Solutions

Prompt Dialog Box In JavaScript

Example: <!DOCTYPE html> <html> <body> <script> function askFromMe() { var result; var favLanguage = prompt(“What’s your favorite programming language?”); switch(favLanguage) { case “php”: result = “PHP is your favourite!”; break; case “javascript”: result = “JavaScript is your favourite!”; break; case “jquery”: result = “JQuery is your favourite!”; break; default: result = “You did not enter […]

Posted in: HTML, JavaScript, Solutions

Display Confirm Alert Box In JavaScript

Example: <script> function displayMessage(){ var sure = confirm(“Do you realy want to visit tutorialstown.com?”); if(sure) window.location.href = “https://tutorialstown.com”; else alert(“You don’t wnat to visit.”); } </script> <body> <button onclick=”displayMessage()”> Visit tutorialstown.com </button> </body>

Posted in: HTML, JavaScript, Solutions

How To Validate A Name In JQuery?

Example: <!Doctype html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script> </head> <script> $(document).ready(function() { $(“button”).click(function() { var user_full_name = $.trim($(“#txt_user_full_name”).val()); if(user_full_name != “”) { if(!user_full_name.match(/^[a-zA-Z ]*$/)) alert(“Only alphabetic characters are allowed!”); else alert(“Name is validated.”); } else alert(“Please enter name!”); }); }); </script> <body> <input type=”text” name=”txt_user_full_name” id=”txt_user_full_name” placeholder=”Enter name”> <br> <button> Submit </button> </body>

Posted in: HTML, jQuery, Solutions
Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .