javascript - onclick reset and showhide -


i have got 1 button reset , 1 link hiding image. onclick used doing this. need use 'hide' link both 'hide' , 'reset' on 'onclick'. code given below:

<script>      function myframe6() {          var ifr = document.getelementsbyname('frame6')[0];          ifr.src = ifr.src;      }  </script>  <p>      <input type="button" value="reset" onclick="myframe2()" class="btn btn-primary">      <a href="#" id="p6-hide" class="hidelink" onclick="showhide('p6');return false;">hide image</a>  </p>

you can either add reset function call (i'm guessing that's myframe2()) link's onclick separated semicolon so:

onclick="showhide(); myframe2()" 

or call myframe2(); , showhide() same function.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -