📄 index.htm
字号:
<html>
<head>
<title>Microchip TCP/IP Stack Home</title>
<script language="JavaScript">
var xmlHttp;
var ObjArray = new Array;
function GetXmlHttpObject(handler)
{
var objXmlHttp = null;
if(navigator.userAgent.indexOf("MSIE")>=0)
{
var ClassName = "Msxml2.XMLHTTP";
if(navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
ClassName = "Microsoft.XMLHTTP";
}
try
{
objXmlHttp = new ActiveXObject(ClassName);
objXmlHttp.onreadystatechange = handler;
return objXmlHttp;
}
catch(e)
{
alert("Error: ActiveX scripting may be disabled.");
return;
}
}
else
{
try
{
objXmlHttp = new XMLHttpRequest();
objXmlHttp.onload = handler;
objXmlHttp.onerror = handler;
return objXmlHttp;
}
catch(e)
{
alert("Error: Browser may not be supported or browser security restrictions are too high. XMLHttpRequest() support is required.");
}
}
}
function StateChanged()
{
if(xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
{
document.getElementById("txtAutoUpdateStatus").innerHTML=xmlHttp.responseText;
xmlHttp = null;
UpdateStatus();
}
}
function UpdateStatus()
{
xmlHttp = GetXmlHttpObject(StateChanged);
xmlHttp.open("GET", "Status.cgi" , true);
xmlHttp.send(null);
}
function GetServerFile(FileName, AssignTo)
{
var NiftyObj = new Object();
NiftyObj.XMLDevice = new GetXmlHttpObject(StateChanged2);
NiftyObj.XMLDevice.open("GET", FileName, true);
NiftyObj.XMLDevice.send(null);
NiftyObj.Text = AssignTo;
ObjArray.push(NiftyObj);
}
function StateChanged2()
{
for(i in ObjArray)
{
if(ObjArray[i].XMLDevice.readyState == 4 || ObjArray[i].XMLDevice.readyState == "complete")
{
if(ObjArray[i].Text != "")
{
document.getElementById(ObjArray[i].Text).innerHTML=ObjArray[i].XMLDevice.responseText;
}
if(ObjArray[i].Text == "txtAutoUpdateStatus")
{
GetServerFile("Status.cgi", "txtAutoUpdateStatus");
}
delete ObjArray[i].XMLDevice;
delete ObjArray[i];
}
}
}
</script>
</head>
<body bgcolor="white" onload="UpdateStatus(); GetServerFile('Version.cgi','txtStackVersion'); GetServerFile('BuildDate.cgi','txtBuildDate');">
<table border="0" width="100%">
<tr>
<td>
<img src="Mchp.gif"></img>
</td>
<td width="100%">
<p align="right">
<font size="6" face="MS Sans Serif">
<b>
Hi!You have download the file!
</b>
</font>
</p>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" fgcolor="white">
<tr bgcolor="#FF0000" fgcolor="white">
<td width="25%">
<font color="#FFFFFF">
<b>Home</b>
</font>
</td>
<td width="25%">
<a href="Features.htm">
<font color="#FFFFFF">
<b>Features</b>
</font>
</a>
</td>
<td width="25%">
<a href="Arch.htm">
<font color="#FFFFFF">
<b>Architecture</b>
</font>
</a>
</td>
<td width="25%">
<a href="Footprnt.htm">
<font color="#FFFFFF">
<b>Stack Footprint</b>
</font>
</a>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="49%">
<b>Welcome!</b>
<br>
Stack version: <span id="txtStackVersion">Unknown</span><br>
Build date: <span id="txtBuildDate">Unknown</span><br>
<p>
This site is
used to demonstrate the power and abilities of an 8 or 16-bit
embedded web server. This site is powered by a Microchip PIC
microcontroller running a Microchip TCP/IP
Stack. Everything you see is served through a
Microchip ENC28J60 10Base-T Ethernet controller or the PIC18F97J60 family Ethernet module.
</p>
<p>
The bottom portion of this page illustrates
real-time control of the demo board. The "Status"
</p>
</td>
<td valign="top" width="2%"></td>
<td valign="top" width="49%">
<p>
section refreshes with board information periodically using JavaScript and
the "Actions" section issues commands to toggle the
on-board LEDs or LCD text (if LCD module is present).
</p>
<p>
You can push the on-board switch(es) or rotate the
potentiometer and see the new data. You may
also click on one of the two LED command buttons to
toggle the on-board LEDs.
</p>
</p>
</td>
</tr>
</table>
<table cellpadding="3">
<form>
<tr>
<td>
<b>Actions</b>
</td>
</tr>
<tr>
<td>Toggle LEDs:</td>
<td>
<input type="button" value="LED2" onclick="GetServerFile('0?1=LED2','')"></input>
</td>
<td>
<input type="button" value="LED1" onclick="GetServerFile('0?0=LED1','')"></input>
</td>
</tr>
<tr>
<td>Write to LCD:</td>
<td>
<input type="text" name="3" id="LCDText" size="16"></input>
</td>
<td>
<input type="button" value="Write" onclick="GetServerFile('1?3='+document.getElementById('LCDText').value,'')"></input>
</td>
</tr>
</form>
<tr>
<form method="get" action="2">
<td>Lab 3<br>Text Box 'T'</td>
<td>
<input type="text" name="T" value="asdf"></input>
</td>
<td>
<input type="submit" value="Do Lab 3"></input>
</td>
</form>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<b>Status</b>
</td>
</tr>
</table>
<span id="txtAutoUpdateStatus">Loading...</span>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -