Site Notice

hello, world

Difference between revisions of "Short url"

From Project-EPB Commons
Line 3: Line 3:
 
<html>
 
<html>
 
<div id="tencent">
 
<div id="tencent">
<pre class="urlFinal">https://url.cn/</pre>
+
<iframe style="border:none; width:100%; height:1.4em;" class="tc-s-url"/>
 
<input placeholder="https://wjghj.cn" value="https://wjghj.cn" class="urlRequest"/> <button onclick="getTencent()">生成</button>
 
<input placeholder="https://wjghj.cn" value="https://wjghj.cn" class="urlRequest"/> <button onclick="getTencent()">生成</button>
 
</div>
 
</div>
 
<script>
 
<script>
 
function getTencent() {
 
function getTencent() {
   if ($('#tc-s-url').length>0) {
+
   $('.tc-s-url).attr('src','https://sa.sogou.com/gettiny?url='+$('#tencent .urlRequest').val());
    console.info('请求频次太快!');
 
  }
 
  $('body').append('<iframe id="tc-s-url" src="https://doc.wjghj.cn/surl?url='+$('#tencent .urlRequest').val()+'"/>');
 
  $('#tc-s-url').load(function(){
 
    var url = $('#tc-s-url').contents().find('body').text();
 
    $('#tencent .urlFinal').html(url);
 
    setTimeout(function(){
 
      $('#tc-s-url').remove();
 
    },5000);
 
  });
 
 
 
 
}
 
}
 
</script>
 
</script>
 
</html>
 
</html>

Revision as of 02:31, 22 November 2019

腾讯

  • url.cn

<html> <div id="tencent"> <iframe style="border:none; width:100%; height:1.4em;" class="tc-s-url"/> <input placeholder="https://wjghj.cn" value="https://wjghj.cn" class="urlRequest"/> <button onclick="getTencent()">生成</button> </div> <script> function getTencent() {

 $('.tc-s-url).attr('src','https://sa.sogou.com/gettiny?url='+$('#tencent .urlRequest').val());

} </script> </html>