[英]How can I change the inside of the modal pop up with the textbox on the main web page
[英]Can i put an .jsp inside a modal pop up
我有listUser.jsp,它具有一个“调用” user.jsp的链接。 user.jsp具有保存在我的数据库中的表单,并且listUser.jsp显示了它。 问题是:我希望以模式方式打开user.jsp,这可能吗? 我在模态中尝试过iframe,但是当我在iframe中在user.jsp中提交时,它“返回”到listUser.jsp并没有关闭。 使用iframe,我已经尝试过此操作(无效):
<script>
function yourFunctionName () {
var div = document.getElementById('dialog');
if(document.getElementById('noop').src === 'user.jsp'){
div.style.display = 'none';
} else {
div.style.display = 'block';
}
}
</script>
<script>
function myFunction() {
setInterval(yourFunctionName, 1000);
}
</script>
我正在学习,所以我不太了解
您可以为此使用jquery,
listUser.jsp
<div id=content></div>
像这样使用jquery代替yourFunctionName()
document.ready(function(){
$('#button').on("click", function() {
$("#content").load(absolutePath/user.jsp);
});
});
希望这会有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.