有一个网站拥有以下功能:
<html>
<body>
<form action="/action_page.php">
First name: <div class="col-md-8 col-sm-8 col-xs-6"><strong><input type="text" class="no-style" value="John"></strong></div>
Last name: <div class="col-md-8 col-sm-8 col-xs-6"><strong><input type="text" class="no-style" value="Miller"></strong></div>
Email: <div class="col-md-8 col-sm-8 col-xs-6"><strong><input type="text" class="no-style" value="j.miller@gmail.com"></strong></div>
<input type="submit" value="Send">
</form>
</body>
</html>
能否从输入值(John,Miller,j.miller@gmail.com)中爬取数据并显示在我的页面上(也许将该网站放入iframe并从中爬取?)或者使用类似以下的内容:
// Get HTML from page
$.get( 'http://example.com/', function( html ) {
// Loop through elements you want to scrape content from
$(html).find("ul").find("li").each( function(){
var text = $(this).text();
// Do something with content
} )
} );
我不知道。我对JavaScript不太擅长。而且,每次刷新输入值都不同,这是一个额外的问题。我能从100次刷新中提取数据吗?非常感谢您的帮助!