<button onclick=”window.print();”> Print </button> use this code window.print(); It will print full opened window.
Read MoreHTML
how to print a Div content in javascript
By using this script we can print the content of a Div. It is working fine. We have to call this script like this: <button …
Read MoreHow to print a div content
<html> <head></head> <body> <style> .AP_CONTNT{width: 1000px;} .AP_HEAD{border: 1px solid;padding: 7px;background: bisque;} .AP_CONTNT1{border: 1px solid;padding: 7px;margin-top: 5px;background-color: cadetblue;} .AP_CONTNT2{border: 1px solid;padding: 7px;margin-top: 5px;background-color: cadetblue;} .AP_CONTNT2_B1{border: 1px …
Read MoreHow to restrict input box to take only numbers
<input type=”text” name=”card_num” size=”4″ maxlength=”4″ onkeyup=”return isNumberKey(this);”> <script> function isNumberKey(e) { var numberRegex = /^[0-9]+$/; if(!numberRegex.test(e.value)) { e.value = e.value.replace(/\D/g, ”); } } </script>
Read MoreHow to load an error image when image not loaded
<img src=”../product_image.jpg” alt=”Image not found” onError=”this.onerror=null; this.src=’../empty/blank.gif’;”/> this will solve the problem
Read MoreHow to remove arrow symbol from input type=number using css
Add this code to your css Input Button look like Enter Pincode <input type=”number” name=”pincode” value=”” /> Enter Pincode <style> input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; …
Read More