表格限制图片大小

[ 2006-05-20 18:18:29 | Author: zhenhua ]
Font Size: Large | Medium | Small
引自经典论坛:
一:
作者:flashlizi
<table id="tbs" width="300" height="200" border="0" cellpadding="0" cellspacing="0">
 <tr>
 <td><img id="pic" src="http://pages.blueidea.com/articleimg/2006/02/1219/preview_b01.jpg" width="1024" height="768" /></td>
 </tr>
</table>
<script>
var tw=document.getElementById("tbs").width;
var picw=document.getElementById("pic").width;
var pich=document.getElementById("pic").height;
if(picw>=tw) {
document.getElementById("pic").width=tw;
document.getElementById("pic").height=(tw/picw)*pich;
}
</script>

二 用图片onLoad属性控制:

<img src="Main.gif" onload="javascript:if(this.width>200)this.width=200">
Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=323
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=323

View Mode: Show All | Comments: 0 | Trackbacks: 767 | Toggle Order | Views: 27821
Trackback buy phentermine no rx
[ buy phentermine no rx | 2012-11-25 02:43:43 ]
Brand and Generic Drugs, Discount Pharmacy. All information about buy phentermine no rx in one place: http://perso.wanadoo.es/gkt14021986/phentermine/buy-phentermine-no-rx.html
Trackback ionamin wiki
[ ionamin wiki | 2012-11-28 02:49:49 ]
Brand and Generic Drugs, Discount Pharmacy. All information about ionamin wiki in one place: http://hoppe.snn.gr/ionamin/ionamin-wiki.html
Trackback cheap pills
[ cheap pills | 2012-12-01 01:16:36 ]
Brand and Generic Drugs, Discount Pharmacy. All information about cheap pills in one place: http://hoppe.snn.gr/amphetamine/cheap-pills.html
Trackback diethylpropion connecticut
[ diethylpropion connecticut | 2012-12-15 10:24:13 ]
Brand and Generic Drugs, Discount Pharmacy. All information about diethylpropion connecticut in one place: http://minven.snn.gr/diethylpropion/diethylpropion-connecticut.html
Trackback lewisville alprazolam
[ lewisville alprazolam | 2012-12-15 10:30:00 ]
Brand and Generic Drugs, Discount Pharmacy. All information about lewisville alprazolam in one place: http://sale.byto.de/alprazolam/lewisville-alprazolam.html
Trackback compton pain killer
[ compton pain killer | 2012-12-30 19:58:21 ]
Brand and Generic Drugs, Discount Pharmacy. All information about compton pain killer in one place: http://dweb.kilu.de/pain-killer/compton-pain-killer.html
Trackback didrex 50mg
[ didrex 50mg | 2012-12-30 20:00:26 ]
Brand and Generic Drugs, Discount Pharmacy. All information about didrex 50mg in one place: http://perso.wanadoo.es/frexer/didrex/didrex-50mg.html
Trackback mobile phendimetrazine
[ mobile phendimetrazine | 2013-01-02 02:43:30 ]
Brand and Generic Drugs, Discount Pharmacy. All infor}ation about mobile phendimetrazine in one place: http://mex.kilu.de/phendimetrazine/mobile-phendimetrazine.html
Trackback guaynabo rocaltrol
[ guaynabo rocaltrol | 2013-01-02 02:44:16 ]
Brand and Generic Drugs, Discount Pharmacy. All information about guaynabo rocaltrol in one place: http://over.byto.de/rocaltrol/guaynabo-rocaltrol.html
Trackback blockade
[ blockade | 2013-01-04 11:09:28 ]
Brand and Generic Drugs, Discount Pharmacy. All information about blockade in one place: http://imar.world.mu/methadone/blockade.html
Trackback prilosec for sale
[ prilosec for sale | 2013-01-10 06:03:28 ]
Brand and Generic Drugs, Discount Pharmacy. All information about prilosec for sale in one place: http://hem.passagen.se/olli8811/prilosec/prilosec-for-sale.html
Trackback mobile zolpidem tartrate
[ mobile zolpidem tartrate | 2013-01-14 07:14:34 ]
Brand and Generic Drugs, Discount Pharmacy. All information about mobile zolpidem tartrate in one place: http://perso.wanadoo.es/zerga/zolpidem-tartrate/mobile-zolpidem-tartrate.html
Trackback darvocet
[ darvocet | 2013-01-16 02:43:26 ]
Brand and Generic Drugs, Discount Pharmacy. All information about darvocet in one place: http://hamton.xhost.ro/darvocet/
Trackback appetite suppressant supplements
[ appetite suppressant supplements | 2013-02-12 21:49:09 ]
Brand and Generic Drugs, Discount Pharmacy. All information about appetite suppressant supplements in one place: http://hem.passagen.se/fishing/appetite-suppressant/appetite-suppressant-supplements.html
Trackback where to get mexican pharmacy
[ where to get mexican pharmacy | 2013-03-01 09:44:12 ]
Brand and Generic Drugs, Discount Pharmacy. All information about where to get mexican pharmacy in one place: http://digilander.libero.it/tsmkk/mexican-pharmacy/where-to-get-mexican-pharmacy.html
Trackback buy flovent canada
[ buy flovent canada | 2013-03-04 01:27:24 ]
Brand and Generic Drugs, Discount Pharmacy. All information about buy flovent canada in one place: http://perso.wanadoo.es/parquerroma/flovent/buy-flovent-canada.html
Trackback buy levothyroxine sodium t4
[ buy levothyroxine sodium t4 | 2013-03-04 01:42:45 ]
Brand and Generic Drugs, Discount Pharmacy. All information about buy levothyroxine sodium t4 in one place: http://chouly.altervista.org/levothyroxine-sodium/buy-levothyroxine-sodium-t4.html
Trackback fastin dosage
[ fastin dosage | 2013-04-01 19:56:14 ]
Brand and Generic Drugs, Discount Pharmacy. All information about fastin dosage in one place: http://digilander.libero.it/lagoletta/fastin/fastin-dosage.html
Trackback minnetonka percocet
[ minnetonka percocet | 2013-04-18 07:14:19 ]
Brand and Generic Drugs, Discount Pharmacy. All information about minnetonka percocet in one place: http://hem.passagen.se/anton93/percocet/minnetonka-percocet.html
Trackback differin
[ differin | 2013-04-18 07:18:36 ]
Brand and Generic Drugs, Discount Pharmacy. All information about differin in one place: http://digilander.libero.it/nadras/differin/

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code