index.html 759 Bytes
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <textarea type="text" placeholder="券号" value="" onchange="onChange(event, 'coupon1')">wangdachui233</textarea>
  <div id="coupon1" class="yoho-conpon" data-token="wangdachui233" data-type="ufo">
    <a href="javascript:;">点我领取UFO优惠券</a>
  </div>
  <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
  <script src="//cdn.yoho.cn/js-sdk/1.3.15/jssdk.js"></script>
  <script>
  function onChange(e) {
    $('#coupon1').data('token', e.target.value)
  }
  </script>
</body>
</html>