一个字符串的简单问题

jhtisboy 2002-04-12 09:40:38
我现在给一个变量str="";
我在if条件中怎样判断str为空
...全文
38 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
weidegong 2002-04-12
  • 打赏
  • 举报
回复
20分解决这样的问题?

<STYLE type=text/css>
.tableData {
BACKGROUND: white; BORDER-BOTTOM: white 1px dashed; BORDER-LEFT: white 1px dashed; BORDER-RIGHT: white 1px dashed; BORDER-TOP: white 1px dashed; COLOR: black; CURSOR: hand; FONT-FAMILY: verdana,arial,helvetica; FONT-SIZE: 12px
}
.tableDataHit {
BACKGROUND: #d0e0ff; BORDER-BOTTOM: #d0e0ff 1px dashed; BORDER-LEFT: #d0e0ff 1px dashed; BORDER-RIGHT: #d0e0ff 1px dashed; BORDER-TOP: #d0e0ff 1px dashed; COLOR: green; CURSOR: hand; FONT-FAMILY: verdana,arial,helvetica; FONT-SIZE: 20px
}
</style>
<script>
function lightOn(obj){
obj.className="tableDataHit";
}
</script>
<a href="a.jsp" class=tableData onmouseout="this.className='tableData'" onmouseover="this.className='tableDataHit'"> sdfsdf</a>
<a href="b.jsp" class=tableData onmouseout="this.className='tableData'" onmouseover="this.className='tableDataHit'" > sdfsdf</a>
jhtisboy 2002-04-12
  • 打赏
  • 举报
回复
请问怎么控制链接中文字的大小
8988 2002-04-12
  • 打赏
  • 举报
回复
在JS中用
if (str==""){...} 或 if (str==null)

在VBS中用
if str="" then 或 if str=null then
jsidiot 2002-04-12
  • 打赏
  • 举报
回复
if trim(str)<>"" then
if len(str)<>0 then

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧