Do something visible on the right side after user input

enter image description here

Now the user enters a zip code on the left side there. After input, I want the delivery method to be visible on the right side. If no zip code is entered, the delivery method must remain invisible.

enter image description here  
The first user with html, css and C #, so any information would be greatly appreciated. Thanks!

+4
source share
1 answer

According to the requirement of only HTML / CSS, you can use the direct selector +to conditionally show / hide elements depending on the validity of the input.

input:invalid + select { display: none; }
<input type="text" pattern="\d{5}" placeholder="ZIP code" required>
<select>
  <option>one</option>
  <option>two</option>
</select>
Run codeHide result
+2
source

Source: https://habr.com/ru/post/1608694/


All Articles