<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="javascript">
function chgImg(){
var cur_img = document.nemo.src;
var get_filename = cur_img.substr(143); //split string
if (get_filename == "workform_top1.gif") {
document.nemo.src = "workform_top2.gif";
} else {
document.nemo.src = "workform_top1.gif";
}
}
</script>
</HEAD>
<BODY>
<img name="nemo" src="workform_top1.gif" onClick="javascript:chgImg();" width="560" height="22">
</BODY>
</HTML>
============ 2 =======================
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="javascript">
var img = new Array("1.gif","2.gif");
var i;
i=0;
function chgImg() {
document.nemo.src = img[i++];
//document.images[0].src = img[i++];possible.
}
</script>
</HEAD>
<BODY>
<img name="nemo" src="1.gif" onClick="javascript:chgImg();">
</BODY>
</HTML>
============= 3=====================
function showDetail(value) {
var get_param = "document."+"imgExtend" + value+ ".src";
//eval(‘document’+value).style.right = 400;
var get_img = eval(get_param);
var get_img_file = get_img.substr(72);
var get_id = "imgID"+value;
var ss = document.getElementById(get_id);
if (get_img_file == "libr_mainBar_ico2.gif" ) {
ss.src = "../../lib/rc/image/img/Workform_library/libr_mainBar_ico1.gif";
} else {
ss.src = "../../lib/rc/image/img/Workform_library/libr_mainBar_ico2.gif";
}
}
<a href="#" onclick="showDetail('{@ID}')">
<img name="imgExtend{@ID}" id="imgID{@ID}" src="../../lib/rc/image/img/Workform_library/libr_mainBar_ico2.gif" border="0" />
</a>
Sunday, 1 July 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment