登陆 | 免费注册(只需一分钟) | 会员中心

聚宝网   购物专题 基金专题 性专题 饮食专题 教育专题 生活大参考 园林资讯 园艺库 健康专题
  论文专题 家庭养花 园林景观 盆景奇石 激情图库 农业资料库 园林古建 英文站 花卉栽培

聚宝网免费为您提供 最新IT资讯

 

首页 > 网页设计 > Xml
如何判断组件内容是否为空?
时间:2007-06-17  www.jubao163.com  来源: 不详

如:<a>123</a>
    <a>345></a>
    </a>
如何分辨出第三种情况?
---------------------------------------------------------------

IN xsl:
<xsl:if test="a=’’">no content</xsl:if>
Or
<xsl:if test="a[.=’’]">no content</xsl:if>


in javascript
t=xmldom.selectSingleNode("//a[index()=2]")
if(t.text=="") alert("no content")




推荐文章
联盟网站

浙ICP备 :07003766号 Copyright © 2001-2007 JUBAO163,All rights reserved.