File: javascript.jsp

package info (click to toggle)
libbsf-java 1%3A2.3.0%2Bcvs20050308a-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,460 kB
  • ctags: 1,264
  • sloc: java: 7,643; cpp: 2,514; xml: 1,773; jsp: 463; ansic: 182; makefile: 61; python: 45; sh: 29
file content (32 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (2)
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
<html> 
<%@ page language="javascript" %>
<head> 
   <title>Temperature Table</title> 
</head> 
<body> 
<h1>Temperature Table <blink>sponsored by Rhino JavaScript</blink></h1> 
<p>American tourists visiting Canada can use this handy temperature 
table which converts from Fahrenheit to Celsius: 
<br><br> 

<table BORDER COLS=2 WIDTH="20%" > 
<tr BGCOLOR="#FFFF00"> 
<th>Fahrenheit</th> 
<th>Celsius</th> 
</tr> 

<%
  for(var i= 0; i <101; i+=10)
  {
    out.println("<tr ALIGN=RIGHT BGCOLOR=\"#CCCCCC\">");
    out.println("<td>" +  i + "</td>");
    out.println("<td>" + Math.round((i - 32)*5/9) + "</td>");
    out.println("</tr>");
  }
%>

</table> 
<p><i> <%= java.util.Date() %> </i></p> 

</body> 
</html>