function confirmVdo(){ var videoVal = $(".video_src").val(); if(videoVal){ videoVal = videoVal.replace(/[ ]/g,""); videoVal = encodeURIComponent(videoVal);//这两行解码视频 }else{ $(".action").text("请输入视频地址"); return false; }