我有一個動態的形式......它有一個輸入字段類似的onclick jQuery的圖片ID,形成輸入字段
<form class=""
<input name="image_0" .. />
<input name="image_1" .. />
<input name="image_4" .. />
<input name="image_6" .. />
<input name="image_7" .. />
....
</form>
和我有一個又一個UL李塊從的Facebook相冊取得圖片.. 。當我們點擊圖像它的「身份證」具有填補空白輸入字段,並沒有重複選擇的任何人......對
圖片:Check this image may be it helps to understand
編輯:
<form class="fb_upload_id" method="get">
image_2:<input name="image_2" type="text">
image_3:<input name="image_3" type="text">
image_4:<input name="image_4" type="text">
</form>
<ul class="facebook_album_photo_list">
<li alt="Paradise Vision from http://Stockwallpapers.in" title="Paradise Vision from http://Stockwallpapers.in" id="463526207001195">
<a style="background: url(https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/427440_463526207001195_392636722_s.jpg) center top no-repeat;" class="overlay_photo" href="javascript:void(0);" onclick="add_image_fb('463526207001195');"></a>
</li>
<li alt="Anonymous Mask from http://Stockwallpapers.in" title="Anonymous Mask from http://Stockwallpapers.in" id="463151140372035">
<a style="background: url(https://fbcdn-photos-a.akamaihd.net/hphotos-ak-snc6/10476_463151140372035_468769127_s.jpg) center top no-repeat;" class="overlay_photo" href="javascript:void(0);" onclick="add_image_fb('463151140372035');"></a>
</li>
<li alt="Mirana Nightshade Priestess of the Moon from http://Stockwallpapers.in" title="Mirana Nightshade Priestess of the Moon from http://Stockwallpapers.in" id="463137303706752">
<a style="background: url(https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/482085_463137303706752_723444526_s.jpg) center top no-repeat;" class="overlay_photo" href="javascript:void(0);" onclick="add_image_fb('463137303706752');"></a>
</li>
<li alt="Fluid Flow in Lauterbrunnen from http://Stockwallpapers.in" title="Fluid Flow in Lauterbrunnen from http://Stockwallpapers.in" id="459694870717662">
<a style="background: url(https://fbcdn-photos-a.akamaihd.net/hphotos-ak-snc7/312978_459694870717662_1068867909_s.jpg) center top no-repeat;" class="overlay_photo" href="javascript:void(0);" onclick="add_image_fb('459694870717662');"></a>
</li>
</ul>
給我們更多的示例html。你給我們的是不夠的。有關如何佈置圖片的一些html會幫助我們。 – Daedalus
@Daedalus添加了示例代碼 –
您是否有每個圖像的輸入?如果我點擊4個不同的圖像並且只有3個輸入,會發生什麼?覆蓋其中之一? –