设置网页内容的示例 HTML 代码

设置网页的内容和格式由其 HTML 代码控制。

复制
设置网页内容示例
SampleSetupPane.html   

<div class="content-fit"> 
<form id="formSampleSettings">
  
<div class="accordion"> 
<h3 target="sample-basic">$%localizedString(基本设置)#$</h3> 
<div id="sample-basic"> 
<table class="formtable"> 
<tr> 
<th>&nbsp;</th> 
<th>&nbsp;</th> 
</tr> 
<tr> 
<td>$%localizedString(以太网)#$</td> 
<td>&nbsp;</td> 
</tr> 
<tr class="minor"> 
<td>$%localizedString(MAC 地址)#$</td> 
<td regname="MAC Address"></td> 
</tr> 
<tr class="minor"> 
<td>$%localizedString(以太网设备名称)#$</td> 
<td><input name="Ethernet Device Name" type="text" /></td> 
</tr> 
<tr class="minor"> 
<td>$%localizedString(IP 地址)#$</td> 
<td><input name="IP Address" type="text" /></td> 
</tr> 
</table>   

</div>   

<h3 target="sample-advanced">$%localizedString(高级设置)#$</h3> 
<div id="sample-advanced"> 
<table class="formtable" id="frameFormatDropdownContainer"> 
<tr> 
<th>&nbsp;</th> 
<th>&nbsp;</th> 
</tr> 
<tr> 
<td>$%localizedString(TCP 保持激活状态(分钟))#$</td> 
<td><input type="text" name="TCP Keep Alive Minutes" class="small" /> <span unitsreg="TCP Keep Alive Minutes"></span></td> 
</tr> 
<tr> 
<td>$%localizedString(启用 Web 服务器)#$</td> 
<td><select name="Enable Web Server"></select> </td> 
</tr> 
</table>   

</div> 
</div>    

<input type="submit" class="apply" value='$%localizedString(Apply)#$' />   

</form>     


<script type="text/javascript">   

SetupPane.init('formSampleSettings'); 
formChangeDetection.initFormChangeDetection('#formSampleSettings', '#dialogFormChanges');   

</script> 
</div> 

 

设置网页内容描述示例
行号 描述
1

SampleSetupPane.html

HTML 文件名,包括 HTML 扩展名 (.html)。此文件名必须符合 SFTP 文件名规则(没有空格或特殊字符)。文件名(不包含 HTML 扩展名)是显示在网页上的名称。

4

<form id="formSampleSettings">

“formSampleSettings”是网页内容的名称。此名称必须唯一。

7

<h3 target="sample-basic">

创建第一个网页内容窗格。“sample-basic”是网页内容的名称。此名称必须唯一。

$%localizedString(Basic Settings)#$</h3>

“Basic Settings”是网页内容窗格的标题。如果可能,请翻译此标题。

8

<div id="sample-basic">

必须与行 7 中网页内容的名称匹配。

15

<td>$%localizedString(Ethernet)#$</td>

“Ethernet”是子标题。如果可能,请翻译此标题。

19

<td>$%localizedString(MAC Address)#$</td>

“MAC Address”是行标题。如果可能,请翻译此标题。

20

<td regname="MAC Address"></td>

显示指定的只读寄存器 MAC 地址的值。

23

<td>$%localizedString(Ethernet Device Name)#$</td>

“Ethernet Device Name”是行标题。如果可能,请翻译此标题。

24

<td><input name="Ethernet Device Name" type="text" /></td>

在文本编辑字段中显示指定的可配置寄存器“Ethernet Device Name”的瞬时值。

类型必须与指定的寄存器类型相匹配,在此情况下为字母数字字符串。

27

<td>$%localizedString(IP Address)#$</td>

“IP Address”是行标题。如果可能,请翻译此标题。

28

<td><input name="IP Address" type="text" /></td>

在文本编辑字段中显示指定的可配置寄存器“IP Address”的瞬时值。

类型必须与指定的寄存器类型相匹配,在此情况下为字母数字字符串。

34

<h3 target="sample-advanced">

创建第二个网页内容窗格。“Sample-advanced”是网页内容的名称。此名称必须唯一。

$%localizedString(Advanced Settings)#$</h3>

“Advanced Settings”是网页内容窗格的标题。如果可能,请翻译此标题。

35

<div id="sample-advanced">

必须与行 34 中网页内容的名称匹配。

42

<td>$%localizedString(TCP Keep Alive Minutes)#$</td>

“TCP Keep Alive Minutes”是行标题。如果可能,请翻译此标题。

43

<td><input type="text" name="TCP Keep Alive Minutes" class="small" /> 

在文本编辑字段中显示指定的可配置寄存器“CP Keep Alive Minutes”的瞬时值。

类型必须与指定的寄存器类型相匹配,在此情况下为字母数字字符串。

<span unitsreg="TCP Keep Alive Minutes"></span></td>

显示测量仪为指定的寄存器“TCP 保持激活状态(分钟)”定义的单位。

注:没有为“TCP 保持激活状态(分钟)”定义单位,因此不显示单位。

46

<td>$%localizedString(Enable Web Server)#$</td>

“Enable Web Server”是行标题。如果可能,请翻译此标题。

47

<td><select name="Enable Web Server"></select> </td>

“Enable Web Server”是显示的指定的寄存器。指定的寄存器列在测量仪寄存器映射中。

类型必须与指定的寄存器类型相匹配,在此情况下,显示一个枚举的值作为下拉列表框。

61

SetupPane.init('formSampleSettings');

必须与行 4 的网页内容名称相匹配。

62

formChangeDetection.initFormChangeDetection('#formSampleSettings', '#dialogFormChanges');

必须与行 4 的网页内容名称相匹配。此 HTML 代码更新所有网页的值。