JavaScript - condicion if

 
Vista:

condicion if

Publicado por ALBERTO JOSE (1 intervención) el 27/09/2018 03:25:46
Buenas Noches, quiero pasar esta operacion hecha en VB a JavaScript

1
2
3
4
5
6
7
8
9
10
11
If PGrasaTextBox.Text >= 10 Then
    EdadGrasaTextBox.Text = 21
End If
 
If PGrasaTextBox.Text >= 10.57 Then
    EdadGrasaTextBox.Text = 22
End If
 
If PGrasaTextBox.Text >= 11.14 Then
    EdadGrasaTextBox.Text = 23
End If

muchas gracias por la ayuda
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Alejandro
Val: 1.448
Plata
Ha mantenido su posición en JavaScript (en relación al último mes)
Gráfica de JavaScript

condicion if

Publicado por Alejandro (531 intervenciones) el 27/09/2018 16:02:42
  • Alejandro se encuentra ahora conectado en el
  • chat de PHP
Suponiendo que el formulario tiene el campo
1
<input id='PGrasaTextBox' type="text" />

1
2
3
4
5
PGrasaTextBox = document.getElementById('PGrasaTextBox').value;
If( PGrasaTextBox >= 10){
    EdadGrasaTextBox.Text = 21
}
...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar