document.write("<img src='" + fileName + "' id='img1' name='img1' width=144px height=115px onclick = 'alert(img1.src)'/>");
解决方案 »
- 这两个个js怎么加密的?有难度
- 请问哪里可以下到这种效果的代码呢?
- 我写了一个鼠标移动到热点上边显示这块的一个标题的js 可是有点毛病 移动出去以后就不显示了
- 包含特殊字符的字符串变量怎样变为转义字符??
- 请教关于jquery.ui.sortable和jquery.ui.droppable的问题
- window.open如何打开一个看不见的窗口
- 有没有这样的对象
- 请问:::怎么让文本框textarea的滚动条自动移到最下方
- ChromeslessWindow 在Internt Explore 6.0 sp1下显示有问题,有解决办法吗?
- 哪位有Dhtml及浏览器文档对象模型DOM的中文电子文档,万分的感谢,100相赠!
- 个人作品两件,散分!~~```
- 求助:点击网页图片后如何获得图片的路径?
fileName = fileNames[i];
document.write(" <td> ");
document.write(" <a href=""> ");
document.write("<img onclick='alert(this.src)' src='" + fileName + "' width=144px height=115px/>");
document.write("</a>");
}
fileName = fileNames[i];
document.write(" <td> ");
document.write(" <a href=""> ");
document.write(" <img onclick='getImageSrc(this)' src='" + fileName + "' width=144px height=115px/>");
document.write(" </a>");
}
function getImageSrc(img)
{
var test=img.src;
alert(test);
}
我写成这样,取不出来~~for(var i=0 ; i <fileNames.length ; i++) {
fileName = fileNames[i];
document.write("<img src='" + filePath + "' width=144px height=115px onclick='getImageSrc(this)'");
} function getImageSrc(img)
{
var test=img.src;
alert(test);
}
我写成这样,还是取不出来~~for(var i=0 ; i <fileNames.length ; i++) {
fileName = fileNames[i];
document.write("<img src='" + filePath + "' width=144px height=115px onclick='getImageSrc(this.src)'");
} function getImageSrc(src)
{
// var test=img.src;
alert(src);
} 靠~~
在IE都可以~~
真TMD的烂浏览器~~~
同情ing,没搞过这中浏览器