0
 <img id="lotImgtemp" src="" height="148px" width="200px" border="0">
    var photonames=$("#loyaltymemPhoto").val();     //1.jpg         
    $("#lotImgtemp").attr("src","localhost/sumerdia/uploaded_photos/'+ photonames +'");

img src に値を追加するには?

出力私は同じを得ます "localhost/sumerdia/uploaded_photos/'+ photonames +'"

私が必要とする出力は"localhost/sumerdia/uploaded_photos/1.jpg"

4

1 に答える 1

2

それ以外の

$("#lotImgtemp").attr("src","localhost/sumerdia/uploaded_photos/'+ photonames +'");

試す

$("#lotImgtemp").attr("src","localhost/sumerdia/uploaded_photos/"+ photonames);
于 2012-06-19T08:30:53.113 に答える