js关于img的href和src取变量及赋值的方法

分类:Javascript| 发布:佚名| 查看: | 发表时间:2014/6/9
代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="upload/2014/6/201406091616263043.jpg" />
</a>
<input type="hidden" name="text10" id="text10" value="http://www.camnpr.com"/>
<script type="text/javascript">

document.getElementById("link").href = "http://camnpr.com/?tn=91001412_s_hao_pg";
document.getElementById("link").href = document.getElementById("text10").value;
document.getElementById("myself").src = "F:\camnpr\图片\IMG_5605c.jpg";
document.write("<h1>Hello World!</h1>")

</script>
<body>
</body>
</html>


目前可以修改href,但src还没有正确,正在研究中,如有知道的伙伴们请留言

365据说看到好文章不转的人,服务器容易宕机
原创文章如转载,请注明:转载自郑州网建-前端开发 http://camnpr.com/
本文链接:http://camnpr.com/archives/1179.html