url
http://localhost/news-events/news.html?file=hosted_service.pdf
Jsコード
parseURL : function() {
var _path = window.location.pathname;
console.log(_path);
var _locationSearch = location.search;
var _locationParse = _locationSearch.replace('?file=','');
console.log(_locationParse);
var filePath = "/pdffiles/"+_locationParse ; // /pdffiles/hosted_service.pdf
$('.divEmbed object').data(filePath); **How to set the data of object? this is wrong**
console.log(filePath);
}
HTML
<div class="divEmbed">
<object data="" type="application/pdf">
alt : It appears you don't have a PDF plugin for this browser.
Click <a href="">here</a> to Download the file.
</object>
</div>
object=filepathのデータを追加したい場合の構文はどうなりますか