我在liferay门户网站上工作,我必须完成这些任务 1.在页面加载时有一个I帧
<iframe id="sstIframe" name="sstIframe" border="0" frameborder="0" hspace="0" scrolling="no" vspace="0" width="100%" height="400" src="<% if(bankfastUrl.contains("-login") || bankfastUrl.contains("rcasPId=")){%><%= bankfastUrl %><%}%>"></iframe>
function setupSstIframeWithform(){
var object = this;
var iframeUrl = $('#sstIframe').attr('src');
if($('#sstIframe').get(0)){
var object = this;
object.form = $('<form action="'+iframeUrl+'" method="post" style="display:none;" target="sstIframe" id="formForIframe" name="formForIframe" ></form>');
var requestParams = sessionStorage.getItem("sstParam");
if(requestParams){
var sstParams = JSON.parse(requestParams);
if(sstParams){
$.each(sstParams, function(value,key){
if(value){
$("<input type='hidden' />")
.attr("name", key)
.attr("value", value)
.appendTo(object.form);
}
})
}
};
var form = document.getElementById('myform');
object.form.submit = function() {
form.target = '_self';
};
$( "body" ).append(object.form);
object.form.submit();
object.form.remove();
}
}
setupSstIframeWithform();`enter code here`