我在我的购物车中开发了一个缩放工具,我仍然坚持如何在jQuery函数中调用PHP变量.
这是我的代码:
jQuery(document).ready(function($){
$('#image1').addimagezoom({ // single image zoom
zoomrange: [3, 10],
magnifiersize: [800,300],
magnifierpos: 'right',
cursorshade: true,
largeimage: "php variable" //we add the directory of the image.
});
});
Run Code Online (Sandbox Code Playgroud)
我需要把
$src ="images/products/".mysql_result($execute_select_product_query,0,'image1')."
Run Code Online (Sandbox Code Playgroud)
在我的函数中,我把PHP变量.