radio jquery

<script>
$(function(){
	//单选按钮
	$('input[name="get_starttime"]').each(function(){
		if('<?php echo empty($output['xianshi_info'])?1:0;?>'==1){
			$('input[nctype="default"]').attr('checked','checked');
			$('#start_time').attr('disabled','disabled').css('background','#E7E7E7 none');
		}else{
			$('input[nctype="auto"]').attr('checked','checked');
			$('#start_time').removeAttr('disabled','disabled').css('background','');
		}		
	});
	$('input[name="get_starttime"]').click(function(){
		if($(this).attr('nctype')=='auto'){
			
			$('#start_time').removeAttr('disabled','disabled').css('background','');
		}else{
			$('#start_time').attr('disabled','disabled').css('background','#E7E7E7 none');
		}
	});
});
</script>
<dl>
  <dt><i class="required">*</i><?php echo $lang['start_time'];?><?php echo $lang['nc_colon'];?></dt>
  <dd>
<ul class="ncsc-form-radio-list">
<li>
<label>
<input name="get_starttime" value="1" type="radio" nctype="default" />
立即发布
</label>
</li>
<li>
<label>
<input name="get_starttime" value="0" type="radio" nctype="auto"/>
  <input id="start_time" name="start_time" type="text" class="text w130" value="<?php echo empty($output['xianshi_info'])?'':date('Y-m-d H:i:s',$output['xianshi_info']['start_time']);?>" /><em class="add-on"><i class="icon-calendar"></i></em><span></span>
	<?php /*<p class="hint"><?php echo sprintf($lang['xianshi_add_start_time_explain'],date('Y-m-d H:i:s',$output['current_xianshi_quota']['start_time']));?></p>*/?>
</label>
</li>
</ul>
<p class="hint"><?php echo sprintf($lang['xianshi_add_start_time_explain'],(empty($output['xianshi_info'])||($output['xianshi_info']['start_time'] < time()))?'当前时间:'.date('Y-m-d H:i:s'):date('Y-m-d H:i:s',$output['xianshi_info']['start_time'])); ?></p>
</dd>
</dl>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值