Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function solve() {
  2. let optionList = document.querySelectorAll("#selectMenuTo")[0];
  3. let button = document.querySelector('button');
  4. let input = document.querySelector('#input');
  5.  
  6. let optionBinary = document.createElement('option');
  7. optionBinary.textContent = 'Binary';
  8. let optionHexadecimal = document.createElement('option');
  9. optionHexadecimal.textContent = 'Hexadecimal';
  10.  
  11.  
  12. optionList.appendChild(optionBinary);
  13. optionList.appendChild(optionHexadecimal);
  14.  
  15. let result = 0;
  16. if (optionList.textContent==="Binary"){
  17. console.log('Its binary');
  18. }else if(optionList.textContent==='Hexadecimal'){
  19. console.log('its hexade');
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement