2014-04-29 77 views
1
< table cellpadding = "0" 
cellspacing = "0" 
border = "0" 
width = "60%" 
align = "center" > 

<tr> < td style = "width: 50% ;vertical-align:top;" > < table cellpadding = "0" 
cellspacing = "0" 
border = "5" 
width = "100%" > <tr> < td style = "height: 10px;width:100%; text-align:center;" 
colspan = "2" 
class = "vth" > General Properties < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Name < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">Hydrogen</td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Symbol </td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > H < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Atomic Number < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">1 </td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Pronunciation</td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > /ˈhaɪdrɵdʒɨn/hye - dro - jin < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Element category < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">nonmetal </td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Group </td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > 1 < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Period < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">1 </td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Block</td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > s < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Atomic Weight < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">1.00794(7) </td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Electron configuration</td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > 1s <sup> 1 < /sup> </td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Electrons per shell</td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > 1 < /td> 
                       </tr > 

<tr> < td style = "height: 10px;width:100%; text-align:center;" 
colspan = "2" 
class = "vth" > Atomic Properties < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Oxidation states < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">1, -1 (amphoteric oxide) </td > 

< /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Electronegativity</td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > 2.20(Pauling scale) < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Ionization energies < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">2.20 (Pauling scale)</td > < /tr> 
                       <tr> 
                        <td style="height: 10px;width:60%;" class="vtd">Covalent radius </td > < td style = "height: 10px;width: 40%;" 
class = "vtd" > 31±5 pm < /td> 
                       </tr > <tr> < td style = "height: 10px;width:60%;" 
class = "vtd" > Van der Waals radius < /td> 
                        <td style="height: 10px;width: 40%;" class="vtd">120 pm</td > < /tr> 

如何使用localStorage的

這裏什麼我發現,所有的週期性元素的數據被手動存儲在表中存儲更多的數據。像這樣我有118個週期性元素。如果我硬編碼所有這些東西,加載頁面太困難了。任何人都可以請建議如何將這些數據存儲在本地存儲或數據庫或其他東西。我可以以哪種方式存儲批量數據。每個週期性元素不具有相同的屬性。

+3

老實說我不得不說這是我見過的最古怪的html格式。 – Nzall

+1

你是什麼意思「本地存儲」?在客戶端還是在服務器上?你是什​​麼意思「加載頁面太難了」? –

+0

您可以使用緩存來存儲數據 – KarthikManoharan

回答

0

您可以保存任何數量的數據在本地存儲.. ..!本地存儲 在Google Chrome,Mozilla Firefox和Opera中爲每個來源提供5 MB的空間; Internet Explorer中的每個存儲區域爲10 MB。 look here for more details

您無法直接從服務器上將值保存到本地存儲,您需要JavaScript將其保存到本地存儲。所以如果你只使用一次數據,它不會有任何區別。

如果要一次又一次使用元素週期表中的值,則可以使用某些onLoadjavascript函數將元素週期表的值保存在Web瀏覽器中。這樣它就不會每次都從服務器獲取。

例如,您可以查看here