Every line of 'button onclick javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
116 _onClick(event: Event): void { 117 const { 118 button, 119 onClick 120 } = this.props; 121 const { 122 enabled, 123 unclickable 124 } = button; 125 126 if (enabled && !unclickable && onClick) { 127 onClick(event); 128 } 129 }
88 function onButtonClick(buttonId, callback) { 89 getById(buttonId).addEventListener("click", callback); 90 }
10 onClick() { 11 console.log('clicked'); 12 }
154 onClick(event) { 155 let options = this.options; 156 let ok = true; 157 if (typeof options.click === 'function') { 158 ok = options.click.call(this, event); 159 } 160 if (ok) { 161 let url = this.makeUrlWithParams(options.popupUrl); 162 openPopup(url, { 163 width: options.popupWidth, 164 height: options.popupHeight, 165 name: `${prefix}_${this.service}`, 166 }); 167 } 168 }
148 elButton.addEventListener("click", function onClick(e) { 149 this.removeEventListener("click", onClick); 150 button.onclick(e); 151 });
51 onClick(event) { 52 // emit the button click event 53 this.buttonClick.emit(event); 54 }
150 onClick(event: any): void { 151 if (this.disabled) { 152 event.preventDefault(); 153 event.stopImmediatePropagation(); 154 } else { 155 this.click.emit(event); 156 } 157 }
53 function clickButton(id) { 54 const element = document.getElementById(id); 55 56 if (element) { 57 element.click(); 58 } 59 }
15 handleClick () { 16 if (this.locked) return 17 18 const { throttle, onClick } = this.props 19 20 onClick && onClick() 21 22 if (throttle) { 23 this.locked = true 24 setTimeout(() => { 25 this.locked = false 26 }, throttle) 27 } 28 }
34 onclick: function onclick(e) { 35 jQuery(this).closest('.form__field-description').parent().find('.toggle-content').toggle(); 36 return false; 37 }