JSFiddle - React, Tailwind, and code Playground
HTML
<input id="btnPage" type="text" value="10"/>
<button>ShowData</button>
JavaScript
$(function() {
var url = 'http://api.themoviedb.org/3/',
mode = 'movie/upcoming',
//page,
key = '?api_key=f33f84e36b5e27e44ec629edacf4e500&language=es';
$('button').click(function() {
// var input = $('#btnPage').val(),
// page = encodeURI(input);
$.ajax({
//url: url + mode + key + '&page='+ page
url: url + mode + key,
dataType: 'jsonp',
success: function(data) {
console.log(data);
}
});
});
});