Fortune Telling Collection - Comprehensive fortune-telling - Fortune telling 1003 untitled

Fortune telling 1003 untitled

Javascript code: function f (o) {if (o.value% =1) {alert ("ji"); }else(alert); }} Code in the body:

The complete code is as follows:

& lt! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " " http://www . w3 . org/TR/XHTML 1/DTD/XHTML 1-Transitional . DTD " & gt;

& lthtml xmlns = " http://www . w3 . org/ 1999/XHTML " & gt;

& lthead & gt

& ltmeta http-equiv = " Content-Type " Content = " text/html; charset=gb23 12" />

& lttitle & gt untitled document

& lt scripting language = "javascript">

Function f(){

var o = document . getelementbyid(" in ");

if(o.value%2== 1){

Alert ("Ji");

} Otherwise {

Alert ("fierce");

}

}

& lt/script & gt;

& lt/head & gt;

& ltbody & gt

& ltdiv id = " show " style = " margin-top: 100 px;" align="center " >

& ltinput type = " text " name = " in " id = " in "/& gt;

& lt input type = "button" name = "Bt" value = "Start fortune telling" onclick = "f ()"/>

& lt/div & gt;

& lt/body & gt;

& lt/html & gt;