1/* 2Creating an HTML5 enhanced responsive-ready contact form, with custom javascript feature detection 3www.toddmotto.com 4*/ 5(function() { 6 7 // Create input element for testing 8 var inputs = document.createElement('input'); 9 10 // Create the supports object 11 var supports = {}; 12 13 supports.autofocus = 'autofocus' in inputs; 14 supports.required = 'required' in inputs; 15 supports.placeholder = 'placeholder' in inputs; 16 17 // Fallback for autofocus attribute 18 if(!supports.autofocus) { 19 20 } 21 22 // Fallback for required attribute 23 if(!supports.required) { 24 25 } 26 27 // Fallback for placeholder attribute 28 if(!supports.placeholder) { 29 30 } 31 32 // Change text inside send button on submit 33 var send = document.getElementById('contact-submit'); 34 if(send) { 35 send.onclick = function () { 36 this.innerHTML = '...Sending'; 37 } 38 } 39 40})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.