📄 webdoc1.c
字号:
//-----------------------------------------------------------------------------
// Net WEBDOC.C
//
// This module contains web pages and headers
//-----------------------------------------------------------------------------
#include "net.h"
// This is the header for web text pages. LENGTH is the body
// length, needed because in HTTP 1.1 we leave connection open
// Includes control statements to prevent browser from caching page
char html_header[] = {
"HTTP/1.1 200 OK\n"
"Cache-control: no-cache\n"
"Connection: Keep-Alive\n"
"Content-Length: TAG:LEN1\n"
"Content-Type: text/html\r\n\r\n" };
// This page displays a table with weather data and a switch
// to turn a port pin on and off.
char web_page[] = {
"<HTML><HEAD><TITLE>EV44B0 1.01 Web Server</TITLE>\n"
//"<META http-equiv=Content-Type content=\"text/html; charset=gb2312\">\n"
"<META http-equiv=\"refresh\" content=\"5\">"
"<META content=\"Microsoft FrontPage 5.0\" name=GENERATOR></HEAD>\n"
"<BODY>\n"
"<FORM action=/index.html method=post>\n"
"<TABLE border=0 width=\"786\">\n"
"<TBODY>\n"
"<TR>\n"
"<TD width=\"739\">\n"
"<H1> \n"
"<H1><font><font size=\"4\"> EV44B0 1.01 Web Server \n"
"演示程序( 五秒后自动刷新 )</font></H1>\n"
"<TABLE border=2 width=\"419\">\n"
"<TBODY>\n"
"<TR>\n"
"<TD width=235 height=25>\n"
"<p align=\"center\"><font face=\"宋体\">接收数据包</font></TD>\n"
"<TD width=166 height=25 align=\"center\">TAG:TMP1个</TD></TR>\n"
"<TR>\n"
"<TD width=235 height=25>\n"
"<p align=\"center\"> 发送数据包</TD>\n"
"<TD width=166 height=25 align=\"center\">TAG:TMP2个</TD></TR>\n"
"<TR>\n"
"<TD width=235 height=25>\n"
"<p align=\"center\">总数据包</TD>\n"
"<TD width=166 height=25 align=\"center\">TAG:VOL1个 </TD></TR></TBODY></TABLE><BR><BR> LED指示灯: \n"
" <INPUT type=radio CHECKED value=1 name=switch>灭(关ADC) <INPUT type=radio \n"
"value=0 name=switch TAG:CHK2>亮(开ADC) <INPUT type=submit value=发送> </TD>\n"
"<TD width=\"37\"><BR> \n"
"</TD></TR>\n"
"<TR>\n"
"<TD width=\"739\">\n"
"</TD>\n"
"<TD width=\"37\"> </TD></TR></TBODY></TABLE></FORM></BODY></HTML>\n"
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -