fork download
  1. var typeOfHouse = document.querySelector('#type');
  2.  
  3. typeOfHouse.addEventListener('change', function () {
  4. if (typeOfHouse.value === 'flat') {
  5. document.querySelector('#price').min = '1000';
  6. }
  7. if (typeOfHouse.value === 'palace') {
  8. document.querySelector('#price').min = '10000';
  9. }
  10. if (typeOfHouse.value === 'house') {
  11. document.querySelector('#price').min = '5000';
  12. }
  13. if (typeOfHouse.value === 'bungalo') {
  14. document.querySelector('#price').min = '0';
  15. }
  16. });
Runtime error #stdin #stdout #stderr 0.01s 171392KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:1:4 ReferenceError: document is not defined