I was trying to display the output values in the child page url using
$(window.open('childpage.html').document.body).html(...)
it open the url with empty page also if I handle the same with
$(window.open().document.body).html(...)
it display the content in the new window. how to get the output value in the page content of the url specified.
i am using the below code :
document.getElementById("BarChart").onclick = function(evt) {
var cdataset = 10;
$(window.open().document.body).html('<style> table, td, th {border: 1px solid black;}table {border-collapse: collapse;}th {text-align: left;} </style><table> <tr> <td> Clicked Radar value :</td><td> ' + cdataset + '</td></tr></table>');
};
You can load parts of the url with jQuery's 'load' function. According to the documentation the following would be suitable for you:
$("#your-container").load("childpage.html #thecontaineryouwanttoinclude");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.