Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src = "http://code.jquery.com/jquery-latest.min.js" type = "text/javascript"></script>
- <select name="tipo" id="tipo" class="form-control select2" required>
- <option></option>
- <option value="prev">Intervenção Preventiva</option>
- <option value="agenda">Intervenção Planeada</option>
- </select>
- <input id="teste" name="teste" type="number" placeholder="Nº De Repetições"
- class="form-control input-md">
- <script type="text/javascript">
- var hideAll = function () {
- $('.optiondiv1').hide();
- }
- $('#tipo').on('change', function () {
- hideAll();
- var category = $(this).val();
- $('.' + category).show();
- document.getElementById("teste").value = "teste";
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement