我正试图将图片加载到一个警告框中,但我得到
"[object HTMLImageElement]"的图片应该在哪里.
这就是我所拥有的:
function joePic(){
var joe_fat = new Image;
joe_fat.src = "pic1.jpg";
alert (joe_fat);
}
<input type="button" value="Click here it find out" name="joePhoto" onclick="joePic()"
height="150" width="150" />
Run Code Online (Sandbox Code Playgroud)
这可能吗?
| 归档时间: |
|
| 查看次数: |
2924 次 |
| 最近记录: |