ConradLax commited on
Commit
0f7917e
·
1 Parent(s): 44c32ca

fix: reference error input

Browse files
Files changed (2) hide show
  1. static/index.html +2 -0
  2. static/script.js +7 -0
static/index.html CHANGED
@@ -33,6 +33,8 @@
33
  </section>
34
  <section>
35
  <input id="img-input" type="file" multiple="multiple" accept="image/jpeg, image/png, image/jpg">
 
 
36
  <output id="img-output"></output>
37
  </section>
38
  </main>
 
33
  </section>
34
  <section>
35
  <input id="img-input" type="file" multiple="multiple" accept="image/jpeg, image/png, image/jpg">
36
+ <button id="classify-btn"></button>
37
+ <p id="test-output"></p>
38
  <output id="img-output"></output>
39
  </section>
40
  </main>
static/script.js CHANGED
@@ -59,4 +59,11 @@ inputImg.addEventListener("change", event =>{
59
  console.log(res);
60
 
61
  outputImg.textContent = "Result is: " + res;
 
 
 
 
 
 
 
62
  });
 
59
  console.log(res);
60
 
61
  outputImg.textContent = "Result is: " + res;
62
+ });
63
+
64
+ const classifyBtn = document.querySelector('classify-btn');
65
+ const outputPar = document.querySelector('test-output');
66
+
67
+ classifyBtn.addEventListener('onclick', () => {
68
+ outputPar.textContent = "asa";
69
  });