直接上代码:

$(".photoImage").click(function(){

var p_w_picpathId = $(this).attr("id");

console.log(p_w_picpathId);

});