加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

PHPCMS新增投票主题无法添加选项的解决办法

发布时间:2020-12-14 03:42:35 所属栏目:Dedecms 来源:网络整理
导读:在这个地方添加投票主题的时候点添加选项没有作用 管理 地址 类似于admin.php?mod=votefile=voteaction=edit_subjectsubjectid=2 点添加选项没有任何作用: $('#newsub'+sid).find('div:last').remove(); }); //删除主题 $('#del').click(function(){ var n=

在这个地方添加投票主题的时候点添加选项没有作用
管理地址类似于admin.php?mod=vote&file=vote&action=edit_subject&subjectid=2

点添加选项没有任何作用:

$(document).ready(function() {
$('#opt_template').hide();
$('#add_new').checkForm(1);
$('input[id^="add"]').click(function(){
var n=$(this).attr('optcount');
$(this).attr({optcount:(++n)});
var sid=$(this).attr('subjectid');
var newopt=$('#opt_template').clone(true);
newopt.attr({id:'newsopt1'}).find('span').text(n+'、');
newopt.find('input[id="pic"]').attr({id : 'pic'+n});
newopt.find('input[sn="99"]').attr( { sn : n } );
newopt.appendTo('#newsub'+sid).show();
});
$('input[id^="dec"]').click(function(){
var sid=$(this).attr('subjectid');
if($('#newsub'+sid).find('div:last').length<1) return false;
var ncount=$('input[subjectid="'+sid+'"][id^="add"]').attr('optcount')
$('input[subjectid="'+sid+'"][id^="add"]').attr({optcount:(ncount-1)});
//$(this).attr({optcount:(ncount-1)});
$('#newsub'+sid).find('div:last').remove();
});
//删除主题
$('#del').click(function(){
var n=$('input[tag="delsubject"][checked]').length;
if(n<1){
alert("没有选中任何选项");return false;
}
if(!confirm("真的删除吗?")) return false ;
$('#action').val('delete');
return true ;
});
//更新排序
$('#listorder').click(function(){
$('#action').val('edit_subject');
this.form.submit();
});
$('input[alter]').click(function(){
var v=$(this).val();
if(v=='0'){
$('#val').hide();
} else {
$('#val').show();
}
});
});

function addPic(index){
file_select('pic'+index,1);
}
function uploadpic(obj){
var id=$(obj).attr('sn');
openwinx('?mod=phpcms&file=upload&uploadtext=pic'+id,'upload','350','350');
}
<?php if(!empty($subjects)){ ?>$('tr[tag="hover"]').trhover();<?php } ?>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读