sclsch

java备忘

BlogJava 首页 新随笔 联系 聚合 管理
  10 Posts :: 0 Stories :: 6 Comments :: 0 Trackbacks
          勘误<input name="error" id="error" <c:if test="${question.state==4}">checked</c:if> <c:if test="${question.state==2}">checked</c:if> type="checkbox" onclick="checkError(this)"/>
          精华
<input name="essence" id="essence" <c:if test="${question.essence==1}">checked</c:if> type="checkbox" /> 
          周刊推荐
<input name="weekly" id="weekly" <c:if test="${question.state==5}">checked</c:if> type="checkbox" onclick="checkWeekly(this)"/>
          隐藏
<input name="hide" id="hide" <c:if test="${question.state==4}">checked</c:if> <c:if test="${question.state==3}">checked</c:if> type="checkbox" onclick="checkHide(this)"/>
            范围外&nbsp;<input name="scopeBeyond" id="scopeBeyond"<c:if test="${question.state==6}">checked</c:if> type="checkbox" onclick="checkScopeBeyond(this)"/>
            客服部
&nbsp;<input name="customerDepartment" id="customerDepartment"<c:if test="${question.state==7}">checked</c:if> type="checkbox" onclick="checkCustomerDepartment(this)"/>
<script language="javascript">
   
   
function add_desc(str){
            FCKeditorAPI.GetInstance('question.answer').InsertHtml(str);
   }

   
function checkScopeBeyond(object){
               
var scopeBeyond=document.getElementById("scopeBeyond");
            
var customerDepartment = document.getElementById("customerDepartment");
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var error=document.getElementById("error");
            
var essence=document.getElementById("essence");
            
var weekly=document.getElementById("weekly");
            
var hide=document.getElementById("hide");
            
            
if(customerDepartment.checked||weekly.checked||error.checked||hide.checked) {
              alert(
"范围外不能与客服部,周刊推荐,勘误分析,隐藏同时选中");
              object.checked 
= false;
            }

            
if(scopeBeyond.checked){
              
var str = "您好,对不起,您所提问的问题不属于本科目范围,请到相应科目答疑区提问或到论坛发帖子交流。祝您学习愉快!";
              add_desc(str);  
            }

      
   }

   
function checkCustomerDepartment(obj){
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var customerDepartment = document.getElementById("customerDepartment");
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var error=document.getElementById("error");
            
var essence=document.getElementById("essence");
            
var weekly=document.getElementById("weekly");
            
var hide=document.getElementById("hide");
            
if(scopeBeyond.checked||weekly.checked||error.checked||hide.checked) {
              alert(
"客服部不能与范围外,周刊推荐,勘误分析,隐藏同时选中");
              obj.checked 
= false;
            }

            
if(customerDepartment.checked){
              
var str = "您好,关于此问题,请与本公司客服部联系,她们会给您详细地解答的。客服部电话:010-62115588 邮箱:kf@dongao.com。祝您学习愉快! ";
              add_desc(str); 
            }

   
   }

   
function checkError(obj){
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var customerDepartment = document.getElementById("customerDepartment");
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var error=document.getElementById("error");
            
var essence=document.getElementById("essence");
            
var weekly=document.getElementById("weekly");
            
var hide=document.getElementById("hide");
            
if(scopeBeyond.checked||weekly.checked||customerDepartment.checked) {
              alert(
"勘误分析不能与范围外,周刊推荐,客服部同时选中");
              obj.checked 
= false;
            }

   }

   
function checkWeekly(obj){
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var customerDepartment = document.getElementById("customerDepartment");
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var error=document.getElementById("error");
            
var essence=document.getElementById("essence");
            
var weekly=document.getElementById("weekly");
            
var hide=document.getElementById("hide");
            
if(scopeBeyond.checked||error.checked||customerDepartment.checked||hide.checked) {
              alert(
"周刊推荐不能与范围外,勘误分析,隐藏,客服部同时选中");
              obj.checked 
= false;
            }

            
   }

   
function checkHide(obj){
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var customerDepartment = document.getElementById("customerDepartment");
            
var scopeBeyond=document.getElementById("scopeBeyond");
            
var error=document.getElementById("error");
            
var essence=document.getElementById("essence");
            
var weekly=document.getElementById("weekly");
            
var hide=document.getElementById("hide");
            
if(scopeBeyond.checked||customerDepartment.checked||weekly.checked) {
              alert(
"隐藏不能与范围外,周刊推荐,客服部同时选中");
              obj.checked 
= false;
            }

   }

</script>
posted on 2007-10-25 14:28 sclsch 阅读(1075) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: