var a = 1;
if (a == 1)
{
document.write("单向"+"</br>");
}
if (a == 2)
{
document.write("a");
}
else
{
document.write("双向"+"</br>");
}
if(a==2)
{
document.write("a");
}
else if(a==3)
{
document.write("b");
}
else
{
document.write("多向"+"</br>");
}
if (a == 2)
{
if (a == 2)
{
document.write("a");
}
else
{
document.write("b");
}
}
else
{
if (a == 1)
{
document.write("嵌套"+"</br>");
}
else
{
document.write("b");
}
}
function isI(num)
{
var res = false;
if(parseInt(num)==num)
{
res = true;
}
return res;
}
function isF(num)
{
var res = false;
if(parseInt(num)!=num)
{
res = true;
}
return res;
}
if(isI(15))
{
document.write("15 is an integer"+"<br/>");
}
if(isF(15.15))
{
document.write("15 is an float"+"<br/>");
}
console