Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在jquery mobile中禁用图像源替换_Jquery_Jquery Mobile - Fatal编程技术网

如何在jquery mobile中禁用图像源替换

如何在jquery mobile中禁用图像源替换,jquery,jquery-mobile,Jquery,Jquery Mobile,我正在使用jquery mobile,在我的站点上加载图像时遇到了一个问题 Jquery mobile将my base href添加到图像源的开头,使我的源出错 如何禁用此功能?解决方案 在网上搜寻了几天的解决方案后,我终于找到了一些有用的东西 我下载了jquery mobile的未压缩源代码,并将变量“newPath”替换为以下代码: var newPath = path.get( $('head base').attr('href') ); 工作起来很有魅力 你能给我们看一个代码示例吗?实

我正在使用jquery mobile,在我的站点上加载图像时遇到了一个问题

Jquery mobile将my base href添加到图像源的开头,使我的源出错


如何禁用此功能?

解决方案

在网上搜寻了几天的解决方案后,我终于找到了一些有用的东西

我下载了jquery mobile的未压缩源代码,并将变量“newPath”替换为以下代码:

var newPath = path.get( $('head base').attr('href') );

工作起来很有魅力

你能给我们看一个代码示例吗?实际上没有任何代码可以显示。。src=“images/test.png”再次替换为src=“”,这还远远不够。如果你知道jquery mobile,你就会知道这个问题。这个问题不需要任何代码示例。句号,那又怎样?转到github,您将看到这是一个众所周知的问题。