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
}
如何解决这个问题的图片是不是自动的???
请帮助我......