Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Servlet/JSP/JSF/JavaFX Script  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to topicflat modethreaded modego to previous topicgo to next topicgo to back
作者 我都考虑好多天了,没能解决的问题
dandy176





发贴: 8
于 2005-06-13 11:55 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
使用request.getParameter("fl");从上一个页面带过来一个数值,但是有格式要求,因此输出使用
StrFormat1.numFormat(request.getParameter("fl"));需要达到的效果是:如果上一个页面没有输入任何值,这个页面就什么都不显示,否则正常显示。
现在的问题是大概是由于那个格式的问题,当上一页什么都没输入时,这页显示.00
我在前面加if试过了,根本不管用,奇怪的是,当if的判断符号为!=时,就执行语句,当if的判断符为==时,就不执行。完全不考虑if后面的任何条件!!



作者 Re:我都考虑好多天了,没能解决的问题 [Re:dandy176]
why

問題兒童

总版主


发贴: 4629
于 2005-06-13 12:07 user profilesend a private message to usersend email to whyreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请使用准确的文字描述作为标题
Your next post without a proper Subject will be removed.



1. What is numFormat?

2. 我在前面加if试过了,根本不管用,奇怪的是,当if的判断符号为!=时,就执行语句,当if的判断符为==时,就不执行。-- show us your code

3. 如果上一个页面没有输入任何值 -- did you check request.getParameter("fl") == null ?


Please read [加贴须知] on our Java基础 board.
http://www.cjsdn.net/post/view?bid=1&id=119201[/color]



作者 Re:我都考虑好多天了,没能解决的问题 [Re:dandy176]
dandy176





发贴: 8
于 2005-06-13 13:17 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
numFormat是一个自定义的类
request.getParameter("fl") == null 这种方法我试过了真挺麻烦,需要我把代码传上来吗?



作者 Re:我都考虑好多天了,没能解决的问题 [Re:dandy176]
why

問題兒童

总版主


发贴: 4629
于 2005-06-13 18:29 user profilesend a private message to usersend email to whyreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
dandy176 wrote:
numFormat是一个自定义的类
request.getParameter("fl") == null 这种方法我试过了真挺麻烦,需要我把代码传上来吗?

Yes please.
Otherwise we are not able to understand clearly the problem you have.



作者 Re:我都考虑好多天了,没能解决的问题 [Re:dandy176]
chengbd



版主


发贴: 687
于 2005-06-16 10:35 user profilesend a private message to usersend email to chengbdreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
应该站在观众的角度上来提问题,等待!


知难而进

reply to topicflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923