这里写了一个获取iframe中的src的url地址并将其修改的例子
<script type="text/javascript" >
var redurl;
$(document).ready(function() {
redurl=$('#redirt').attr("value");
$('#titles').find('a').removeClass('here');
$('#zuche').addClass('here');
});
window.onload = (function () {
var iObj = document.getElementById('ifm');
if(redurl!=null && redurl!=''){
iObj.src=redurl;
}
//alert("1:"+redurl);
//alert("2: "+iObj.src);
});
document.getElementById('ifm').location.reload();
</script>
<body class="body" style="text-align: center;">
<span id="redirt" value="${redirectURL}"></span>
<div id="wape">
<jsp:include page="/WEB-INF/head.jsp"></jsp:include>
<iframe id = "ifm" src="http://www.demo.com/demo.aspx?pid=108048 " frameborder="0" width="1000px;" style="text-align: center; height: 800px" scrolling="auto" >
</iframe>
<jsp:include page="/WEB-INF/bottom.jsp"></jsp:include></div>
</body>