我想在iframe中铺设我的页面,但我找不到任何内容
my formDemand.js:
$(document).ready(function() {
console.log("form demande............");
var chauffeur = JSON.parse(sessionStorage.getItem("chauffeur"));
console.log("data.userId"+chauffeur.userId);
console.log("SUCCESSSSSSSSSS::::::::::"+chauffeur.emailAddress);
$('#demande').html('<iframe src=http://147.282.192.216:8087/delegate/ticketservlet?mode=1&email='+ chauffeur.emailAddress+'name="myFrame"'+ 'id="idFrame" onload="'+trigger()+'">'+'</iframe>');
console.log("DDDDDDDDDDDDDDD::::::::::");
function trigger() {
alert("Chargé");
}
<div id="demande" style="padding-left:10px;padding-right:10px;background:#fff;width:400;height:900;" >
结果:
请问有什么问题?
答案 0 :(得分:0)
您的src
属性缺少双引号。
$('#demande').html('<iframe src="http://147.282.192.216:8087/delegate/ticketservlet?mode=1&email='+ chauffeur.emailAddress+'" name="myFrame" id="idFrame" onload="'+trigger()+'">'+'</iframe>');