Site Notice

hello, world

Short url

From Project-EPB Commons
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

<html>

<pre id="url"></pre> <input placeholder="https://wjghj.cn" value="https://wjghj.cn" id="request" style="width:20em"></input> <button onclick="start()">生成短网址</button>

<script> function start() {

 $.ajax({
   url: 'https://common.wjghj.cn/api.php',
   type: 'post',
   dataType: 'json',
   data: {
     action: 'shortenurl',
     url: $('#request').val(),
     format: 'json'
   },
   success: function(data) {
     $('#url').html(data.shortenurl.shorturl);
   }
 });

} </script> </html>