📄 webdoc.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 code 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 code web_page[] = {"<HTML><HEAD><TITLE>基于单片机的Web服务器</TITLE>\n"
"<META http-equiv=Content-Type content=\"text/html; charset=gb2312\">\n"
"</HEAD>\n"
"<BODY>\n"
"<br>\n"
"<br>\n"
"<br>\n"
"<br>\n"
"<br>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<blockquote>\n"
"<FORM action=/index.html method=post>\n"
"<font size=\"4\">基于单片机的Web服务器演示程序</font>\n"
"<BR><BR><BR><BR>LED指示灯: \n"
"<INPUT type=radio TAG:CHK1 value=1 name=switch>灭 \n"
"<INPUT type=radio\n"
"value=0 name=switch TAG:CHK2>亮 \n"
"<INPUT type=submit value=发送>\n"
"</FORM>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</blockquote>\n"
"</BODY></HTML>\n"};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -