如何使用 html 代码创建子函数?
How to create a sub function with html code?
我正在尝试在经典 asp 中创建一个显示密码:文本 space 的子函数?有什么建议吗?
Sub GetPassword()
response.write " Password:"
<input type="text" name="txtEmPwd" size="20" value="<%=strEmPwd%>"> 1st 3 chars of
last name <input type="text" name="txtFirst3" size="5" maxlength=3 value="<%=strFirst3%>">
end sub
我在大于字符
处收到错误
Microsoft VBScript 编译错误“800a0400”
预期声明
那是因为您直接在服务器端代码中编写 html。
您必须将 html 添加为字符串,如下所示:
Sub GetPassword()
dim html
html = "Password:"
html = html & "<input type='text' name='txtEmPwd' size='20' value='" & strEmPwd & "'> 1st 3 chars of last name "
html = html & "<input type='text' name='txtFirst3' size='5' maxlength='3' value='" & strFirst3 & "'>"
Response.Write html
end sub
我正在尝试在经典 asp 中创建一个显示密码:文本 space 的子函数?有什么建议吗?
Sub GetPassword()
response.write " Password:"
<input type="text" name="txtEmPwd" size="20" value="<%=strEmPwd%>"> 1st 3 chars of
last name <input type="text" name="txtFirst3" size="5" maxlength=3 value="<%=strFirst3%>">
end sub
我在大于字符
处收到错误Microsoft VBScript 编译错误“800a0400”
预期声明
那是因为您直接在服务器端代码中编写 html。 您必须将 html 添加为字符串,如下所示:
Sub GetPassword()
dim html
html = "Password:"
html = html & "<input type='text' name='txtEmPwd' size='20' value='" & strEmPwd & "'> 1st 3 chars of last name "
html = html & "<input type='text' name='txtFirst3' size='5' maxlength='3' value='" & strFirst3 & "'>"
Response.Write html
end sub