随机语录 - API

# 随机语录API请求方式 #
  • Method: Get

# 请求地址 #
https://api.liuzhuai.com/yan/api.php
# 参数 #
  • charset//字符编码(gbk/utf-8)
  • encode//返回类型(text/js/json)

  • # 返回数据 #
    js输出:function binduyan(){document.write('');}

    # 备注 #
    js调用举例:<script src="http://api.btstu.cn/yan/api.php?encode=js"></script>
    js输出举例:<div><script>binduyan()</script></div>
    # 示例 #
    https://api.liuzhuai.com/yan/api.php?charset=utf-8
    https://api.liuzhuai.com/yan/api.php?encode=js