[查看演示] 源码如下 ---------------------------------------------------------- <!-- TWO STEPS TO INSTALL IMAGE RESIZER - DRAG AND DROP:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function resizeImage(evt,name){
newX=evt.x
newY=evt.y
eval("document."+name+".width=newX")
eval("document."+name+".height=newY")
}
// End -->
</script>
</HEAD>
<BODY>
Click and drag on the image to resize it.
<p>
<img src="jsimg/cursor.gif"
width="150" height="58" name="image1"
ondrag="resizeImage(event,'image1')">
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div> |