![](/img/trans.png)
[英]I want to write a javascript code to fetch data from koha (An ILS)
[英]I want to fetch file and image in php code from javascript code
jwplayer("vplayer").setup({
sources: [{file:"server-url",label:"480p"}],
image: "server.com/img.jpg",
width: "100%",
height: "100%",
stretching: "uniform",
duration: "5931",
preload: 'auto',
androidhls: "true",
hlshtml: "true",
primary: "html5",
startparam: "start"
我認為您不能直接分配給 php 變量。 我做了什么,我的項目獲取了 javascript 變量值並創建了一個隱藏的輸入,例如( <input input ="file" class="file" name ="file" value="" >
)並使用$(".file").val(image);
這我得到了值。否則你需要使用 ajax 將這些值發送到另一個頁面
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.