| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 483 人关注过本帖
标题:asp.net问题,新手,求解决!
只看楼主 加入收藏
wasdwasd0302
Rank: 1
等 级:新手上路
帖 子:7
专家分:5
注 册:2013-5-13
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:1 
asp.net问题,新手,求解决!
<script type="text/javascript">        
    function hide() {            
        document.getElementById('td11').style.display = 'none'; }
</script>



<tr  id="td11">                           
<td>模板行</td>                           
<td>/  </td>                           
<td>/  </td>                           
<td>                                
<%                                    
double delay = 0;                                    
string timebegin1 = "04-26";                                    
string timeend1 = "06-25";                                    
string time1 = DateTime.Now.ToString("MM-dd");                                    
if ((timebegin1.PadLeft(5, '0')) > 0 && (timeend1.PadLeft(5, '0')) < 0)                                    
{                                       
delay = 30;                                   
}                                      
else 。。。。。。                                
%>                                
<%=Math.Round(delay, 2)%>                           
</td>  
</tr>
上面是主要的代码,我这边想达到的效果是:如果日期范围不在4-26和6-25号之间的话,要显示的的“模板行”调用相应代码给隐藏起来,请问该肿么写啊!
搜索更多相关主题的帖子: javascript function double 
2013-05-13 11:36
shangsharon
Rank: 9Rank: 9Rank: 9
来 自:湖北武汉
等 级:蜘蛛侠
威 望:7
帖 子:221
专家分:1261
注 册:2012-3-25
收藏
得分:20 
<%                                    
double delay = 0;                                    
string timebegin1 = "04-26";                                    
string timeend1 = "06-25";                                    
string time1 = DateTime.Now.ToString("MM-dd");                                    
bool tmp=((timebegin1.PadLeft(5, '0')) > 0 && (timeend1.PadLeft(5, '0')) < 0);

//两个tmp判断的地方按自己的需求修改
if(tmp){
%>
<tr  id="td11">                           
<td>模板行</td>                           
<td>/  </td>                           
<td>/  </td>                           
<td>                                
<%                           
if (tmp)                                    
{                                       
delay = 30;                                   
}                                      
else {}                              
%>                                
<%=Math.Round(delay, 2)%>                           
</td>  
</tr>
<%
}
%>
2013-05-15 18:28
快速回复:asp.net问题,新手,求解决!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015855 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved