Skip to content Skip to sidebar Skip to footer

Use A Js Function After Another Function

<

Solution 1:

You should change onclick="refreshdiv("a")" to onclick="refreshdiv(\'a\')" in your <button> tags. The "inner" double quote is actually ending the "outer", an alternative would be to escape the inner quotes like so: \".


Solution 2:

You should change onclick="refreshdiv("a")"> to onclick="refreshdiv(\'a\')"> etc.

'<button type="button" style="height: 180px; width: 200px"  onclick="refreshdiv(\'a\')"> a </button><button type="button" style="height: 180px; width: 200px" onclick="refreshdiv(\'b\')"> b </button><button type="button" style="height: 170px; width: 200px" onclick="refreshdiv(\'c\')"> c </button>';

Here's wroking example http://jsfiddle.net/8RjW5/1/


Post a Comment for "Use A Js Function After Another Function"