小白教程
所有教程
关于
Search
172.70.100.62
172.70.100.62
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Func cstr”的源代码
本页内容
上一节:
Func_csng
下一节:
Func_formatcurrency
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:CStr}}[[Category:vbscript ref functions|43]] = VBScript CStr 函数 = [[vbscript ref functions|完整的 VBScript 参考手册]] CStr 函数把表达式转换为字符串(String)类型。 === 语法 === <pre> CStr(expression) </pre> {| class="table table-striped table-hover" !width="50%"| 参数 !width="50%"| 描述 |- | expression | 必需。任何有效的表达式。 如果表达式是: * Boolean - CStr 函数将返回一个字符串,其中包含 true 或 false。 * Date - CStr 函数将返回一个字符串,其中包含短日期格式的日期。 * Null - 将发生 run-time 错误。 * Empty - CStr 函数将返回一个空字符串("")。 * Error - CStr 函数将返回一个字符串,其中包含单词 "Error" 和错误号码。 * Other numeric - CStr 函数将返回一个字符串,其中包含数字。 |} <sample title="" desc="" lang="vb" hererun="1"> <script type="text/vbscript"> document.write(CStr("300000") & "<br />") document.write(CStr(#10-05-25#) & "<br />") </script> </sample> 以上实例输出结果: <sample title="" desc="" lang="vb" hererun="1"> 300000 10/5/2025 </sample> [[vbscript ref functions|完整的 VBScript 参考手册]]
返回至“
Func cstr
”。
上一节:
Func_csng
下一节:
Func_formatcurrency