ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Html

Antony HuancasPráctica o problema19 de Noviembre de 2021

315 Palabras (2 Páginas)119 Visitas

Página 1 de 2

<!doctype html>

<html><head>

<meta charset="utf-8">

<title>Documento sin título</title>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

<script>

function calcular()

{

var subtotal;

var nombre;

var igv;

var total;

pt = (document.getElementById("txtproducto").value);

pc = parseFloat(document.getElementById("txtprecio").value);

c = parseFloat(document.getElementById("txtcantidad").value);

nombre = pt;

document.getElementById("txtrespuesta").value = "Nombre del Producto es: "+ nombre;

$("#exito").delay(500).fadeIn("slow");

subtotal = pc * c;

document.getElementById("txtsubtotal").value = "El subtotal es: "+ subtotal;

$("#exito").delay(500).fadeIn("slow");

igv = subtotal * 0.18;

document.getElementById("txtigv").value = "El igv es: "+ igv;

$("#exito").delay(500).fadeIn("slow");

total = subtotal + igv;

document.getElementById("txttotal").value = "El total es: "+ total;

$("#exito").delay(500).fadeIn("slow");

return;

}

function nuevo(){

$("#exito").fadeOut("slow");

$("#fracaso").fadeOut("slow");

document.getElementById("txtproducto").value="";

document.getElementById("txtcantidad").value="";

document.getElementById("txtprecio").value="";

}

</script>

<style type="text/css">

#formulario #form1 h1 u {

font-family: Impact, Haettenschweiler, Franklin Gothic Bold, Arial Black, sans-serif;

}

</style>

</head>

<body>

<style>

body {

background-image: url("imagenes/tienda.jpg");

background-repeat: no-repeat;

background-size: 100%;

}

</style>

<div id="formulario">

<form id="form1" name="form1" method="post">

<h1 style="color: #5FE02A" align="center">Tienda de Don Pepe</h1>

<p>

<label for="textfield"><strong>Nombre del Producto:</strong></label>

<input type="txtproducto" name="textfield" required= "required" id="txtproducto">

</p>

<p>

<label for="textfield"><strong>Precio Del Producto:</strong></label>

<input type="txtprecio" name="textfield" required="required" id="txtprecio">

</p>

<p>

<label for="textfield"><strong>Cantidad:</strong></label>

<input type="txtcantidad" name="textfield" required="required" id="txtcantidad">

</p>

<p>

<br>

<input type="button"

...

Descargar como (para miembros actualizados) txt (3 Kb) pdf (42 Kb) docx (9 Kb)
Leer 1 página más »
Disponible sólo en Clubensayos.com