我是靠谱客的博主 安详缘分,这篇文章主要介绍jquery得到iframe src属性值的方法,现在分享给大家,希望可以做个参考。

取得iframe src属性的的值:

Html代码

<!DOCTYPE HTML> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>jquery</title> 
<style type="text/css"> 
</style> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
<script type="text/javascript"> 
$(document).ready(function (){ 
var dk = $(window.parent.document).find("#iframe_id").attr("src"); 
alert(dk); 

}); 
</script> 
</head> 
<body> 
<iframe id="iframe_id" name="iframe_name" src="http://www.baidu.com"></iframe> 
</body> 
</html>

最后

以上就是安详缘分最近收集整理的关于jquery得到iframe src属性值的方法的全部内容,更多相关jquery得到iframe内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(118)

评论列表共有 0 条评论

立即
投稿
返回
顶部