日期:2014-05-17 浏览次数:20968 次
<table id="tbl001" cellspacing=10>
<tr>
<th align="left"><span class=labeltext>用户名</span></th>
<td align="left">
<input type="text"
name="USERNAME"
size=20
onFocus="this.className='focusField';"
onBlur="this.className='';">
</td>
</tr>
<th align=left>
<span class=labeltext>密码</span>
</th>
<td align="left">
<input type="password"
name="PIN"
size=20
onFocus="this.className='focusField';"
onBlur="this.className='';">
</td>
</tr>
</table>
foreach (HtmlElement em in log_auto.All)
{
string str = em.Name;
string id = em.Id;
if ((str == "USERNAME") || (str == "PIN") || (str == "submit")) /
{
switch (str)
{
case "USERNAME": em.SetAttribute("value", "xiewei");
break;
case "PIN": em.SetAttribute("value", "1");
break;
default:
break;
}
}