javascript - Changing innerhtml value produces a blank line -


i have toggle link show or hide table. code link. when shown there no blank line between link , table underneath

<a id='togglelink' name='togglelink' href='javascript:toggletable();' title='show inactive edb appointments' >     <p style='text-align:center'>show inactive edb appointments </a> 

when link clicked table shows , change link text

link.innerhtml = "<p style='text-align: center'>hide inactive edb appointments"; 

after code executed blank line appears between link , table underneath

close off paragraph tag within html , javascript.

<a id='togglelink' name='togglelink' href='javascript:toggletable();' title='show inactive edb appointments' >      <p style='text-align:center'>show inactive edb appointments</p>  </a>

link.innerhtml = "<p style='text-align: center'>hide inactive edb appointments</p>";


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -