=====================第一个==================================
<script type="text/javascript">
            function submitMe(){
                document.getElementById('bidwordform').submit();
            }
            function submitAll(){
                window.parent.submitAll();
            }
</script>=====================第二个===================================
<script type="text/javascript">
       function addBW(){
       var isSubmit=true;
       var bidwords = document.getElementsByName("bidwords");
          var newbidword = document.getElementById("newbidword");
          var newbw = document.getElementById("newbw");
          
          var title=document.getElementById("goodstitle").value;
          title=jsTrim(title);
          var description=document.getElementById("description").value;
          description=jsTrim(description);
          var td=title.concat(description);
          
           //判断宝贝标题和宝贝简介是否合法
   if (checkTitle(title,description)==false){
      return false;
   }
           
           if (jsTrim(newbidword.value).length==0){
              alert("请输入要添加的竞价词!");
              return false;
           }
           
           if (!isValidReg(newbidword.value)){
              alert("竞价词含有非法字符!");
              return false;
           }
            
               /*
           //判断标题和描述是否包含此竞价词,这里要根据空格来拆分用户输入的关键词,并以此来判断是否包含在标题和描述中
           var word=newbidword.value.toLowerCase();
           var myRegExp =/(\s)/;           var wordArray=word.split(myRegExp);
           for(var i=0;i<wordArray.length;i++){
               if (td.toLowerCase().indexOf(wordArray[i])==-1){
                  alert("选择的竞价词必须包含在宝贝标题或者宝贝描述中!");
                  return false;
               }
           }
           */
   
   
           if (bidwords!=null&& bidwords.length>0) {
              for (var i = 0; i < bidwords.length; i++) {
                  //判断是否重复alias词
                  if ( bidwords[i].value!=""&& newbidword.value.toLowerCase()==bidwords[i].value.toLowerCase()) {
                     alert("输入的竞价词已经存在!请重新输入!");
                     newbidword.value="";
                     newbidword.focus();
                     isSubmit = false;
                     return false;
                  }
              }
           }
           
          if (isSubmit){
             newbw.value=newbidword.value;
         document.bidwordform.action.value="bidwordmanage:addword/addBidWordAction";
      }
      
  //更改状态,正在提交提交中
  load = false;
  
  document.getElementById("event_submit_do_add_bidword").style.display="none";
  document.getElementById("addwordtishi").style.display="";
  document.getElementById("event_submit_do_add_bidword").submit();
  
      return isSubmit;
} /**
 * 删除前要求用户进行确认.
 */
function isDelete(word, wordalias) {
if(window.confirm("真的要删除【" + wordalias + "】吗?")) {
document.getElementById("word").value = word;
return true;
}
return false;
}

/**
 * 用户在价钱输入框中做了改动时激活这个事件.
 */
function newMaxPrice(maxpriceinput) {
document.getElementById("updatePrice").value = maxpriceinput.value;
}
</script>