<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>
radio jquery
最新推荐文章于 2017-09-08 14:34:48 发布