File Syntax on PC

[Total: 0    Average: 0/5]

This shows how to syntax-wise create a string to be used as a file on your pc that will be assigned to the image.src variable.

Body Code:

Note that you won't see images below as these images are not
on your PC, or on the server.<BR>
<script type=text/javascript>
var _f2 = '/images/blue_ball0.gif'
var _f3 = '/images/red_ball0.gif'
function doIt() {
  document.images["pic2"].src = _f2;
  document.images["pic3"].src = _f3;
Pic 2 - <img name="pic2" border="0" src="/images/green_ball0.gif" height="50">
Pic 3 - <img name="pic3" border="0" src="/images/yellow_ball0.gif" height="50">
<a href="javascript:doIt()">click me</a>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *