新手上路
- 积分
- 48
- 金钱
- 48
- 注册时间
- 2013-7-17
- 在线时间
- 3 小时
|
原子哥,您好!
若想在实验52 ENC28J60网络模块实验的web代码中添一个按钮代码怎么做?
以下是按扭1的代码
if(s->inputbuf[1]=='?'&&s->inputbuf[6]==0x31)//LED1
以下这是按扭2的代码
else if(s->inputbuf[1]=='?'&&s->inputbuf[6]==0x32)//LED2
那新添加的按钮3要怎么写?
else if(s->inputbuf[1]=='?'&&s->inputbuf[6]==0x33)//LED3
这样写可以吗 那个是0x33吗?
另外请问strx=strstr((const char*)(data_index_html+13),"LED0状态");中的+13是怎么意思 百度里查不到?
htlm文件里源码新加的按钮3 这样写可以吗?
<input type=button value="LED2状态反转" onclick="window.location.href('/?led=3')">
因为前两个按钮源码里是像以下那样写的 我按钮3直接模仿这两个。
<input type=button value="LED0状态反转" onclick="window.location.href('/?led=1')">
<input type=button value="LED1状态反转" onclick="window.location.href('/?led=2')">
另外请问('/?led=2')是怎么意思 百度里查不到?
|
|