10 examples of 'clear input field javascript' in JavaScript

Every line of 'clear input field 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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
63function clearInputFields() {
64 $("#vulnerabilityVulnIdInput").val("");
65 $("#vulnerabilityTitleInput").val("");
66 $("#vulnerabilitySubtitleInput").val("");
67 $("#vulnerabilityDescriptionInput").val("");
68 $("#vulnerabilityRecommendationInput").val("");
69 $("#vulnerabilityReferencesInput").val("");
70 $("#vulnerabilityCreditsInput").val("");
71 //$("#vulnerabilityCreatedInput").val("");
72 //$("#vulnerabilityPublishedInput").val("");
73 //$("#vulnerabilityUpdatedInput").val("");
74 $("#vulnerabilityCweSelect").val("");
75 //todo calculator buttons
76 $("#vulnerabilityVulnerableVersionsInput").val("");
77 $("#vulnerabilityPatchedVersionsInput").val("");
78}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

53function clearInputFields() {
54 $("#componentNameInput").val("");
55 $("#componentVersionInput").val("");
56 $("#componentGroupInput").val("");
57 $("#componentDescriptionInput").val("");
58 $("#componentLicenseSelect").val("");
59 $("#componentFilenameInput").val("");
60 $("#componentPurlInput").val("");
61 $("#componentCpeInput").val("");
62 $("#componentCopyrightInput").val("");
63 $("#componentMd5Input").val("");
64 $("#componentSha1Input").val("");
65 $("#componentSha256Input").val("");
66 $("#componentSha512Input").val("");
67 $("#componentSha3256Input").val("");
68 $("#componentSha3512Input").val("");
69}
52function clearInput( frm ) {
53 $( frm ).val( "" );
54}
41clearInput() {
42 ReactDOM.findDOMNode(this.refs.input).value = '';
43}
38clearValue() {
39 this.props.onChange('');
40}
230clear (target) {
231 this.setText('', target);
232}
13function autoCompleteClearValueFieldIfTextIsEmpty(autoCompleteFieldId)
14{
15 if (document.getElementById(autoCompleteFieldId).value == '')
16 {
17 document.getElementById(autoCompleteFieldId + '_AutoComplete').value = '';
18 }
19}
76function clear_search_box()
77{
78 if(search_box_can_clear()) {
79 $("#query-box").val('');
80 }
81}
7function clearForm()
8{
9 $(':input').not(':button, :submit, :reset, :hidden, :checkbox, :radio').val('');
10 $(':checkbox, :radio').prop('checked', false);
11 $('#search-text').focus();
12}
82function jsclearType(id)
83{
84 el=document.getElementById(id);
85 el.checked='';
86}

Related snippets