blob: 0ca417f5ee9299e44830b3952699ef7334a2d666 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<!DOCTYPE html>
<html>
<head>
<title>test ecmascript Number.isInteger()</title>
</head>
<body>
<h1>test ecmascript Number.isInteger()</h1>
<noscript><p>Javascript is disabled</p></noscript>
<script>
function fits(x, y) {
if (Number.isInteger(y / x)) {
return 'YES';
}
return 'NO';
}
function gfits(x, y) {
if (isInteger(y / x)) {
return 'YES';
}
return 'NO';
}
document.write("<p>");
try {
document.write(fits(5, 10), fits(5, 11));
document.write(gfits(5, 10), gfits(5, 11));
} catch (e) {
document.write(e);
}
document.write("</p>");
</script>
</body>
</html>
|