0
var temp="path.png"
如何传递临时VAR到jQuery函数如下图所示传递一个JS变种到jQuery的行动属性
$('#mapfoto').prepend('<img id="theImg" src="http://path.gr/"+temp />')
var temp="path.png"
如何传递临时VAR到jQuery函数如下图所示传递一个JS变种到jQuery的行动属性
$('#mapfoto').prepend('<img id="theImg" src="http://path.gr/"+temp />')
使用正确的引号放置于字符串连接:
$('#mapfoto').prepend('<img id="theImg" src="http://path.gr/' + temp + '" />');
$('#mapfoto').prepend('<img id="theImg" src="http://path.gr/' + temp + '" />');