26 lines
642 B
HTML
Executable file
26 lines
642 B
HTML
Executable file
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
|
|
let text = prompt("Introduce un texto", "Este texto es de pruebaaa");
|
|
let char = prompt("Introduce un caracter", "a");
|
|
|
|
let text_rem = "";
|
|
for(let i = 0; i < text.length; i++){
|
|
if (text[i] != char){
|
|
text_rem += text[i];
|
|
}
|
|
}
|
|
|
|
alert(text_rem);
|
|
|
|
</script>
|
|
</body>
|
|
</html> |