如何设置嵌入式推文?

时间:2016-06-30 13:09:11

标签: javascript html css twitter oembed

我有这个脚本(使用oembed):

<script type='text/javascript'> $(document).ready(function() {
  $("#resolve").click(function() {
    var url=$("#retweet_form_url").val();
    if (url=="") {
      $(".controls").addClass("error");
    }
    else {
      $("#embed").show();
      $.ajax( {
        url: "https://publish.twitter.com/oembed?maxwidth=840&maxheight=1000&url="+url, dataType: "jsonp", success: function(data) {
          $("#embed").html(data.html);
        }
      });
    }
  })
}) 
</script>
<input type="text" id="retweet_form_url" />
<button id="resolve">Get</button>
<div id="embed"></div>

它有效,用户输入的推文网址和推文显示,但我想让它没有边框..怎么样?

0 个答案:

没有答案
相关问题