帝国cms内容页投诉或者报错弹窗,有需要的拿去。
//投诉或报错弹窗 $(function(){ $('.tsbc').bind('click',function(e){ $(".backdrop").show(); if(!$(".complain").html()){ $(".backdrop").after('<div class="complain"><div class="complain-dialog"><div class="complain-hd"><span class="pop-close" title="关闭"></span><h3>软件投诉或纠错</h3></div><div class="tab-bar clearfix"><span>问题:</span><label for="complain1"><input type="radio" id="complain1" checked="" rel="complain-1" value="0" name="complain">无法下载</label><label for="complain2"><input type="radio" id="complain2" rel="complain-2" value="1" name="complain">版本过旧</label><label for="complain3"><input type="radio" id="complain3" rel="complain-3" value="2" name="complain">内容编辑错误</label><label for="complain4"><input type="radio" id="complain4" rel="complain-4" value="3" name="complain">软件侵权</label><label for="complain5"><input type="radio" id="complain5" rel="complain-5" value="4" name="complain">软件报毒</label><label for="complain6"><input type="radio" id="complain6" rel="complain-6" value="5" name="complain">其他问题</label></div><div class="complain-form"><div class="form-txt clearfix"><span>说明:</span><textarea name="problem" id="item-1" placeholder="请在这里描述您遇到的错误问题..."></textarea></div><div class="button-box"><button id="complainTj" name="complainTj" type="button" onclick="feedback_up();" class="button sub_button">提交</button></div></div></div></div>'); } $(".complain").show(); $(".complain-form .form-txt textarea").click(function(){ $(this).css("color","#333"); }); e.stopPropagation(); }); $('.pop-close').live('click',function(e){ $(".complain").hide(); $(".backdrop").hide(); e.stopPropagation(); }); $('.backdrop').bind('click',function(e){ $(".complain").hide(); $(".backdrop").hide(); e.stopPropagation(); }); $('.complain').bind('click',function(e){ $(".complain").show(); $(".backdrop").show(); e.stopPropagation(); }); }); function feedback_up(){ var types=$(".complain input[name=complain]:checked").val(); var url=window.location.href; var problem=$("#item-1").val(); if(!problem){ alert('反馈问题描述不能为空!'); $("#item-1").focus(); return; } if(problem.length<5){ alert('反馈问题描述不能小于5个汉字!'); $("#item-1").focus(); return; } $.ajax({ url: '/index.php?m=seahot&c=index&a=feedback_up', type: 'POST', dataType: 'json', data: {'types':types,'url':url,'problem':problem}, success: function(data){ if(data.status==1){ alert(data.msg); $(".complain").hide(); $(".backdrop").hide(); }else{ alert(data.msg); } } }); }