Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function pregunta() {
- var a = document.forms["validacion"]["isbn"].value;
- var b = document.forms["validacion"]["titulo"].value;
- var c = document.forms["validacion"]["paginas"].value;
- var d = document.forms["validacion"]["precio"].value;
- var e = document.forms["validacion"]["ano"].value;
- var f = document.forms["validacion"]["id_idioma"].value;
- var g = document.forms["validacion"]["autor"].value;
- var h = document.forms["validacion"]["id_categoria"].value;
- var i = document.forms["validacion"]["id_editorial"].value;
- if (a == "") {
- alert("ingrese un isbn");
- } else if (b == "") {
- alert("ingrese un titulo");
- } else if (c == "") {
- alert("ingrese numero de paginas");
- } else if (d == "") {
- alert("ingrese un precio");
- } else if (e == "") {
- alert("ingrese un año");
- } else if (f == "") {
- alert("ingrese un idioma");
- } else if (g == "") {
- alert("ingrese un autor");
- } else if (h == "") {
- alert("ingrese una categoria");
- }else if (i == "") {
- alert("ingrese una editorial");
- }
- else {
- if (confirm('¿Está seguro que desea agregar?')) {
- document.validacion.submit()
- }
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement