How to use Javascript to determine the size of an image, in fact, just write a simple function. Of course, many people may not know how to write this judgment. I found that using ASP to judge the size of the picture is more complicated than counting cow hairs, and after making a judgment, you will make a judgment, and you will also need to display it logically. ..bother. Use Javascript to judge and do it easily. The final effect is nothing more than not letting the big picture break the page.
<script LANGUAGE="JAVASCRIPT">//Check whether the image size is greater than the expected size. If it is greater than it is displayed as the expected size function show (chkw) { //chk images widthif(chkw>500) {chkw=500;}else {chkw=chkw;}return chkw;}//shawl.qiu script//example <img src="images/teach/opera/01.jpg" onload="this.width=show(this.width)" >//script>1. Check box automatically selected by the mouse: <input TYPE="checkbox" onMouseMove="checked=true"><input TYPE="checkedbox" onMouseMove="checked=true">2.ACCESS List the number of days of a certain day//This algorithm took me an hour to query the data of all days of the week to which the date belongs to SELECT *FROM ctdate_by_query_dateWHERE dateandtime between ((#2006-5-15#+Weekday (2006-5-15))-6) and #2006-5-15#+Weekday (2006-5-15) 3. Double-click the mouse to copy the text, and now you will be clear if you double-click it <script LANGUAGE="JAVASCRIPT">function ClipBoard(tdObj) { //IE Onlyvar holdtext = document.all['holdtext'];holdtext.innerText = tdObj.innerText;Copied = holdtext.createTextRange();Copied.execCommand("Copy");alert("text copied");}</script><form NAME="form1" METHOD="post" ACTION=""><ttextarea id="holdtext" style="display:none" ROWS="10"></ttextarea></form>