Reply Tue 18 Feb, 2014 01:18 pm

I need to make a function with the onclick handler swapTwo() to encapsulate the statements for swapping the source files for the two image elements. The button in the page should call this function when clicked.
ANY help would be great.

<!doctype html>
<!-- swap.html Dave Reed -->
<!-- Web page that swaps two images at the click of a button. -->
<!-- ======================================================== -->

<title>Image Swapper</title>

<div style="text-align:center">
<h2>Image Swapper</h2>
<img id="leftImg" src="">
<img id="rightImg" src="">
<input type="button" value="Swap images"
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,499 • Replies: 0
No top replies


Related Topics

How does one uninstall a program? - Question by Woollcott
Adding a JavaScript 'Copy to Clipboard' - Discussion by BobbyDouglas
JavaScript: OnSelect question - Discussion by neocode
Javascript - Control C textarea script - Discussion by Craven de Kere
2018123 - Question by ibk1995
javascript loops for - Question by vartul agnihotri
  1. Forums
  2. » Swap Image
Copyright © 2021 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 06/14/2021 at 03:38:50