javascript - 尝试自动扫描其他域上的闪存嵌入链接
问题描述
我试过这段代码来拉网站,但是当我测试它时,警报框没有运行。
<script type="text/javascript" >
$(document).ready(function(){
$.get( "https://crossorigin.me/https://google.com", function( data ) {
alert( "Data Loaded: " + data );
});
});
</script>
解决方案
从文档中获取,尝试实现该.fail
方法以查看问题所在。
var jqxhr = $.get( "example.php", function() {
alert( "success" );
})
.done(function() {
alert( "second success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "finished" );
});
// Perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() {
alert( "second finished" );
});
crossorigin.com的作者也警告说
请不要在生产现场使用代理。
我无法保证服务的稳定性,您可能会遇到服务中断的情况。
推荐阅读
- r - 编写 R 函数时检索列表的元素
- google-analytics - 如何通过向用户的电子邮件收件箱发送标记链接来识别用户?
- java - 由于缺少主类警报,无法在 MacOS 上安装 Eclipse
- opencv - OpenCV 安装卡在 [39%] ;待构建的 OpenCV 模块;
- java - Java中的帕斯卡三角形
- python - Pandas sqlalchemy create_engine 与 SQL Server Windows 身份验证的连接
- mysql - MYSQL 中固定开始日期但动态结束日期
- swift - 如何在 xCode 中以编程方式设置图像
- shell - 在带有变量的循环中使用`cdo`出现“未处理的输入”错误
- node.js - 如何使vue应用程序进行生产