0
我使用Kurento魔鏡和每次我會改變圖像,我被迫改變圖片的名稱mario-Wings.png。使用jQuery和Kurento更改圖像源
這裏是代碼所示
function getopts(args, opts)
{
var result = opts.default || {};
args.replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) { result[$1] = decodeURI($3); });
return result;
};
var args = getopts(location.search,
{
default:
{
ws_uri: 'ws://' + location.hostname + ':8888/kurento',
hat_uri: 'http://' + location.host + '/img/mario-wings.png',
ice_servers: undefined
}
});
假設我們在界面 有幾個圖片現在,我想通過製造點擊改變形象。
我開始創建一個功能,但該功能通過對這種改變在啓動
function changeImage(nom){
\t \t
\t console.log(" Avant Changement de l'image ");
\t args = getopts(location.search,
\t {
\t default:{
\t \t ws_uri: 'ws://' + location.hostname + ':8888/kurento',
\t hat_uri: 'http://' + location.host + '/img/test5.jpg',
\t \t ice_servers: undefined
\t \t } \t
});
\t $("#test5").attr('src', 'img/test5.jpg');
\t console.log("Après Changement de l'image ");
\t \t \t
}
如何解決這個問題的圖片是不是自動的???
請幫助我......