JSFiddle - React, Tailwind, and code Playground
by Dream Mkker
HTML
<div>
<input type='text' id="url"/>
<button>刷新頁面FB</button>
</div>
JavaScript
$( "button" ).click(function() {
$.ajax({
type: "POST",
url: "https://graph.facebook.com/",
data: {"id": $("#url").val(),"scrape" : "true"},
success: function( data ) {
var obj = jQuery.parseJSON(JSON.stringify(data));
alert(obj.url);
},
error: function(data){
alert("UPDATE FAIL")
}
});
});