Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

prompt dentro de una funcion javascript

function alerta() 
{
var mensaje;
var opcion = prompt("Introduzca su nombre:", "Aner Barrena");
 
if (opcion == null || opcion == "") {
        mensaje = "Has cancelado o introducido el nombre vacío";
        } else {
            mensaje = "Hola " + opcion;
            }
            document.getElementById("ejemplo").innerHTML = mensaje;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to convert numbers to roman numerals in javascript 
Javascript :: Change tilte alert 
Javascript :: if this then this, else that 
Javascript :: utm to lat long 
Javascript :: copy value from one sheet to anotehr 
Javascript :: plumsail on change event value 
Javascript :: convert csv to json typescript 
Javascript :: function solution(n) { } 
Javascript :: sanitize html before storing to db in js 
Javascript :: how to add github secrets in javascript 
Javascript :: jsf localdate converter 
Javascript :: js remove child with index 
Javascript :: How do i filter name in ng-repeat angularjs 
Javascript :: angularjs How to pass option value and label created with ng-repeat triggered by ng-change 
Javascript :: Angularjs to Angular Migration: factory prototype 
Javascript :: Angular.js : recursive call to an $mdDialog controller 
Javascript :: Calculating state happens to late 
Javascript :: Use of typescript generics for extended parametres 
Javascript :: Render JOSN in frontend 
Javascript :: in express remove page ,sort ,limit and fields from req.query 
Javascript :: yaml request body json 
Javascript :: useEffect in React 18 in strictmode 
Javascript :: Exporting And Importing From A Module 
Javascript :: phaser reverse matrix columns 
Javascript :: what is setImmediate vs clearImmediate 
Javascript :: 1st element in underscore javascript 
Javascript :: Create Built-in AbortController Object 
Javascript :: how to broadcast to the entire room scket io 
Javascript :: add text to each element in an array javascript 
Javascript :: livewire multiple root elements detected. this is not supported 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =