<div class="em-main" style="text-align: center">
<div class="em-div-head" align="center"> E-Shop Jewellery </div>
<div class="em-textbox" style="border:hidden">
<input type="text" value="To:" name="recipient" style="width:97%">
</div>
<div id="em">
<div class="em-middle">
<div style="border-bottom:solid 1px #CCCCCC">
<textarea class="em-textarea" onblur="if (this.value == '') { this.value='Write a
message..'; }" onfocus="if(this.value == 'Write a message..') { this.value =
''; }" value="Write a message.." name="message">Write a message..</textarea>
</div>
<div id="em_rt_tp_scroller" class="em_rt_tp_scroller">
<div id="em-rightscrollerimage" style="border:none">
<div class="em-mdimage"><img class="mail" src=" http://localhost:8080/weather
/servlets.ImgDisplayServlet?id=D:\EML\workspace\assets\tried-
imgs\18__1882_IMG_5731_203_173.png " alt="imagecontainer image" style="max-
height:100%; max-width:100%;">
<ul>
<img id="em-delete" class="removeicon" width="7" height="7" title="Remove" bottom="10%"
src="jqe13/image/delete_s.PNG">
</ul>
</div>
<div class="em-mdimage">
<img class="mail" src=" http://localhost:8080/weather
/servlets.ImgDisplayServlet?id=D:\EML\workspace\assets\tried-
imgs\13__1882_IMG_5731_120_124.png " alt="imagecontainer image" style="max-
height:100%; max-width:100%;">
<ul>
<img id="em-delete" class="removeicon" width="7" height="7" title="Remove"
bottom="10%" src="jqe13/image/delete_s.PNG">
</ul>
</div>
<div class="em-mdimage">
<img class="mail" src=" http://localhost:8080/weather
/servlets.ImgDisplayServlet?id=D:\EML\workspace\assets\tried-
imgs\15__1882_IMG_5731_341_137.png " alt="imagecontainer image" style="max-
height:100%; max-width:100%;">
<ul>
<img id="em-delete" class="removeicon" width="7" height="7" title="Remove"
bottom="10%" src="jqe13/image/delete_s.PNG">
</ul>
</div>
</div>
</div>
</div>
<div class="em-bottom" align="center">
<input id="SEND" type="button" value="send" name="">
<input id="CANCEL" type="button" value="cancel" name="">
</div>
</div>
</div>
上面的代碼運行HTML代碼的郵件,包括圖像sources.i附上3個圖像 到類=「EM-mdimage」。可任何一個可以幫助我得到所有3個圖像路徑(如D:\ EML \ workspace \ assets \ tried-imgs \ 18__1882_IMG_5731_203_173.png)使用jquery。然後我將發送 這3條路徑到我的servlet點擊「發送」按鈕。 我是新來jquery.I嘗試了一些選擇器,但我沒有得到這些路徑。 在此先感謝。我怎樣才能使用jQuery
jQuery的.attr('src')應該可以幫到你。你可能需要將它彈出一個數組,但是這會得到你所需要的信息 –
對不起,如果我誤解了這個問題,我正在打電話,但函數.attr('src')有幫助嗎? –