JavaScript中的连接
我的密码是JavaScript中的连接,javascript,concatenation,Javascript,Concatenation,我的密码是 var call_from='fb_test' jQuery('.test').html("<img src=\"https://wwww.socialappshq.com/images/socialapps/loading.gif\" height=\"15\" width=\"15\" id=\"loading_image_\" + call_from + \">"); 但是它没有正确连接请帮助我使用javascript编写html时,更喜欢“将字符串和属性值括起来
var call_from='fb_test'
jQuery('.test').html("<img src=\"https://wwww.socialappshq.com/images/socialapps/loading.gif\" height=\"15\" width=\"15\" id=\"loading_image_\" + call_from + \">");
但是它没有正确连接请帮助我使用javascript编写html时,更喜欢“将字符串和属性值括起来”
var call_from='fb_test'
jQuery('.test').html('<img src="https://wwww.socialappshq.com/images/socialapps/loading.gif" height="15" width="15" id="loading_image_' + call_from + '">');
当您使用javascript编写html时,首选“将字符串和属性值括起来”
var call_from='fb_test'
jQuery('.test').html('<img src="https://wwww.socialappshq.com/images/socialapps/loading.gif" height="15" width="15" id="loading_image_' + call_from + '">');
请尝试下面的代码
var call_from='fb_test';
var yourHtml = '<img src="https://wwww.socialappshq.com/images/socialapps/loading.gif" height="15" width="15" id="loading_image_' + call_from + '"/>';
jQuery('.test').html(yourHtml);
请尝试下面的代码
var call_from='fb_test';
var yourHtml = '<img src="https://wwww.socialappshq.com/images/socialapps/loading.gif" height="15" width="15" id="loading_image_' + call_from + '"/>';
jQuery('.test').html(yourHtml);
对于JavaScript中的连接,请尝试以下方法
对于JavaScript中的连接,请尝试以下方法
缺少双引号请查看您的答案缺少双引号请查看您的答案您也缺少双引号您也缺少双引号