Mybatis的xml文件中使用if标签的test里面进行数值的判断的正确写法

Mybatis的xml文件中使用if标签的test里面进行数值的判断的正确写法:
这里着重指出一下就是数值类型的写法:

方式一:xx =‘数值’.toString() 的方式有效,另外注意是 == 不是一个 =

在这里插入图片描述
.

方式二:或者另外一种方式,如下图所示:另外注意是 == 不是一个 =

在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
用Tree组件来制作下拉菜单,会比较方便。但用FLASH AS打造下拉菜单会更灵活。而且最重要的是占用空间更小。只有两K多。一般用组件来完成的项目,都会自己开发的东西大一些。 主要是使用XML分析。分析并获取XML的节点。转换成FLASH里面的元素。 1、制作显示菜单,以及下拉菜单; 2、编写XML文件; 3、添加AS。 //固定大小,禁止缩放 fscommand("allowscale", "false"); //创建一个新的空 XML 对象 var my_xml:XML = new XML(); //取消空白节点输出 my_xml.ignoreWhite = true; //加载xml my_xml.load("http://www.taoshaw.com/taoshaw/study/xml_listxiala/List.xml"); //判断是否加载成功,如果成功,则继续前进 my_xml.onLoad = function(ok:Boolean) { if (ok) { xml_Length = my_xml.firstChild.childNodes.length; //读取xml子节点的长度 for (i=0; i<XML_LENGTH; { _root.attachMovie("mc", "mc"+i, i); _root["mc"+i]._y = 100; _root["mc"+i]._x = i*70+110; _root["mc"+i].txt = my_xml.firstChild.childNodes.attributes.nume; //读取菜单名称 } //根据子节点来设置菜单 } else { trace("加载XML失败!"); } }; _root.onMouseDown = function() { for (i=0; i<XML_LENGTH; { xml_Length2 = my_xml.firstChild.childNodes.childNodes.length; if (_root["mc"+i].hitTest(_root._xmouse, _root._ymouse)) { if (my_xml.firstChild.childNodes.hasChildNodes()) { for (j=0; j<XML_LENGTH2; { //调用子菜单元件 _root.attachMovie("xialamc", "xialamc"+i+j, i+j+50); //读取子菜单名称 _root["xialamc"+i+j].subtxt = my_xml.firstChild.childNodes.childNodes[j].attributes.subnume; //设置MC的默认座标 _root["xialamc"+i+j]._x = i*70+168; _root["xialamc"+i+j]._y = j*30+128; } } //否则删除该菜单下的子菜单 } else { for (j=0; j<10; j++) { removeMovieClip(_root["xialamc"+i+j]); } } } //当然K为真时,打开网址 if (k) { getURL(my_urll, _blank); } }; //当鼠标触到菜单时,显示该菜单的子菜单 _root.onMouseMove = function() { k = false; //当鼠标触及菜单时,菜单改变颜色 for (i=0; i<XML_LENGTH; { if (_root["mc"+i].hitTest(_root._xmouse, _root._ymouse)) { _root["mc"+i].gotoAndStop(2); } else { //否则仍旧为默认颜色 _root["mc"+i].gotoAndStop(1); } for (j=0; j<10; j++) { //鼠标触发子菜单时,改变子菜单的颜色 if (_root["xialamc"+i+j].hitTest(_root._xmouse, _root._ymouse)) { _root["xialamc"+i+j].gotoAndStop(11); //读取url值,并赋值给变量“my_urll” my_urll = my_xml.firstChild.childNodes.childNodes[j].attributes.url; //设置k为真 k = true; } else if (_root["xialamc"+i+j]._currentframe != 10 && _root["xialamc"+i+j]._currentframe != 11) { _root["xialamc"+i+j].play(); } else { //将xialamc内时间轴停在第10帧 _root["xialamc"+i+j].gotoAndStop(10); } } } };

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值