3. Usando un messagebox¶
xxxxxxxxxx
from browser import document, alert, window, html
def guardar_datos(event):
try:
destino = entrada_destino.value
descripcion = entrada_descripcion.value
direccion = entrada_direccion.value
if not destino or not descripcion or not direccion:
raise ValueError("Todos los campos deben estar llenos")
window.sessionStorage["Destino"] = destino
window.sessionStorage["Descripción"] = descripcion
window.sessionStorage["Dirección"] = direccion
except Exception as excepcion:
alert(f'Error: {excepcion}')
app = html.DIV()
app <= html.LABEL('Destino: ')
entrada_destino = html.INPUT()
app <= entrada_destino
app <= html.LABEL('Descripción: ')
Activity: 3.1 ActiveCode (ac_l54_3a)


Activity: 3.2 Poll (TWP54)
You have attempted 1 of 3 activities on this page