第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

jQuery插進(jìn) tooltip提示和validate

標(biāo)簽:
JQuery

 

<script type="text/javascript" class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%=path%>/common/js/jquery.tipsy.js"></script>     <script type="text/javascript" class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%=path%>/common/js/jquery.validate.js"></script>

validate.js

 

function AddAbroadTravel(){}  $().ready(function() {     $("#abroadtravelForm").validate({         submitHandler:function(form){             if(!AddAbroadTravel.validateSchedule()){                 return;             }             var form = document.getElementById("abroadtravelForm");             form.encding="application/x-www-form-urlencoded";             form.action = "/admin/abroadTravelAction!showAbroadTravel";             form.target = "_self";             form.submit();         },         rules: {             "info.travelName": {                 required: true,                 minlength: 2,                 maxlength: 100             },             "info.travelDeparture": {                 required: true             },             "info.travelDestin": {                 required: true             },             "info.travelRoomUsers": {                 required: false,                 digits:true             },             "info.travelOnePersonRoom": {                 minlength: 0,                 maxlength: 100             },             "info.travelDiningViews": {                 required: false,                 minlength: 0,                 maxlength: 25             },             "info.travelHotel": {                 required: false,                 minlength: 0,                 maxlength: 50             },             "info.travelTouristGuide": {                 required: false,                 minlength: 0,                 maxlength: 50             },             "info.travelConditions": {                 required: false,                 minlength: 0,                 maxlength: 50             },             "info.travelPeriod": {                 required: true,                 digits:true             },             "info.travelAccomCity": {                 required: false,                 minlength: 0,                 maxlength: 50             },             "info.travelFuelCosts": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelLocalTax": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelAirportConstrFee": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelChildrenPrice": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelPoints": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelOtherOptions": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelNotes": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelCommitment": {                 required: false,                 minlength: 0,                 maxlength: 250             },             "info.travelDepaTime": {                 required: true             }         }     });     var initTravelDeparture = jQuery("#initTravelDeparture").val();     var initTravelDestin = jQuery("#initTravelDestin").val();          if(!initTravelDeparture)         initTravelDeparture = "";              if(!initTravelDestin)         initTravelDestin = "";              linkage.init('travelDeparture_select_country','travelDeparture_select_city',initTravelDeparture);     linkage.init('travelDestin_select_country','travelDestin_select_city',initTravelDestin);  });  //上传景点图片 AddAbroadTravel.uploadImg = function(){     var imgPath = jQuery("#upload").val();     if(imgPath){         var form = document.getElementById("abroadtravelForm");         form.encding="multipart/form-data";         form.action = "/admin/abroadTravelImgAction";         form.target = "uploadImgFrame";         form.submit();     } };  //删除景点图片 AddAbroadTravel.delImg = function(imgA){     jQuery(imgA.parentNode.parentNode).remove(); };  //追加日程 AddAbroadTravel.addSchedule = function(){     var imgsTables = document.getElementById("scheduleTable");     var tr = imgsTables.insertRow(imgsTables.rows.length);     var strHtml = '<td width="70px">第<input type="text" title="日程天数,正整数" id="scheduleDay"  name="scheduleDay" maxlength="2" class="text_30" />';     strHtml += '日</td><td align="right" width="70px">观光内容:</td><td width="222px">';     strHtml += '<textarea class="textarea_300_50"  title="观光内容的介绍,0-250个字符" id="scheduleContent" name="scheduleContent"></textarea>';     strHtml += ' </td><td align="right" width="70px">居住酒店:</td>';     strHtml += ' <td><input type="text" id="scheduleHotels" title="居住的酒店名称,2-100个字符" name="scheduleHotels" maxlength="100" class="text_120" /> ';     strHtml += '<a href="JavaScript:void(0)" onclick="AddAbroadTravel.delSchedule(this)">X</a></td>';     tr.innerHTML = strHtml;     jQuery('#div2 [title]').tipsy({trigger: 'focus',fade: true}); };  //删除日程 AddAbroadTravel.delSchedule = function(obj){     jQuery(obj.parentNode.parentNode).remove(); };  //验证日程 AddAbroadTravel.validateSchedule = function(){     var scheduleDays = jQuery("input[name='scheduleDay']");     var scheduleContents = jQuery("textarea[name='scheduleContent']");     var scheduleHotels = jQuery("input[name='scheduleHotels']");      var i = 0;     for(i = 0; i < scheduleDays.length; i++){         if(!FM.STRING.isNum(jQuery(scheduleDays[i]).val())){             jQuery(scheduleDays[i]).focus();             return false;         }     }      for(i = 0; i < scheduleContents.length; i++){         if(jQuery(scheduleContents[i]).val().length > 250){             jQuery(scheduleContents[i]).focus();             return false;         }     }          for(i = 0; i < scheduleHotels.length; i++){         if(jQuery(scheduleHotels[i]).val().length > 100){             jQuery(scheduleHotels[i]).focus();             return false;         }     }     return true; };

 

點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺(jué)得本文不錯(cuò),就分享一下吧!

評(píng)論

作者其他優(yōu)質(zhì)文章

正在加載中
數(shù)據(jù)庫(kù)工程師
手記
粉絲
52
獲贊與收藏
361

關(guān)注作者,訂閱最新文章

閱讀免費(fèi)教程

  • 推薦
  • 評(píng)論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評(píng)論
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說(shuō)多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊(cè)有機(jī)會(huì)得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

舉報(bào)

0/150
提交
取消