confirm ( prompt_expr )
confirm ( prompt_expr, boolean_expr)
devuelve un valor booleano
Esta función visualiza una ventana de mensaje con botones Yes(si) y No(no). Si el usuario pulsa Yes se devolverá true (verdadero) y false (false) si se pulsa No
This function displays a message box with “Yes” and “No” buttons. A true value will be returned when the user selects “Yes” and false will be returned when “No” is selected. You may set the default button by setting a second argument to true or false.
ans = confirm("¿Quiere continuar?") if ans then print "continuar" else print "terminar todo" end end if
0.9.9.42 | Nueva Version |