<div class="fswt"> <textarea type="text" id="fswt_nr" class="fl" placeholder="请输入您的问题" name="text"></textarea> <img id="dyfs" class="fl" src="./static/images/send.gif" /> </div> <script language="javascript"> var url = window.location.href;//当前页面 var shang=window.document.referrer; //来源上一页 var biaos=encodeURIComponent("自设入口");//标识 if(shang.indexOf("word")!=-1){ var k = window.document.referrer.split(‘word=‘)[1].split(‘&‘)[0]; /*将关键词赋值给input*/ document.getElementById("fswt_nr").value=decodeURIComponent(k); }else{ } /*进入页面后5秒跳转快商通*/ /* setTimeout("zjtiao()",5000); function zjtiao(){ var dyfs=document.getElementById("fswt_nr").value; KS.openChatWin({cv:dyfs,sText:‘自设入口‘}); } */ setTimeout("dh1()",2000); function dh1(){ document.getElementById("hd1").style.visibility="visible"; setTimeout("dh2()",3000); } function dh2(){ document.getElementById("hd2").style.visibility="visible"; } var index=0; var str=document.getElementById("fswt_nr").placeholder; function type(){ if(index==str.length+1){ index=0; } document.getElementById("fswt_nr").placeholder = str.substring(0,index++); } setInterval(type, 500); document.getElementById("dyfs").onclick=function(){ var dyfs=document.getElementById("fswt_nr").value; KS.openChatWin({cv:dyfs,sText:‘自设入口‘}); } </script>
时间: 2024-09-29 18:26:22