samedi 9 juillet 2016

Change Text Align On Click

I am looking to have a button that shifts the text alignment to the left side whenever it is clicked. This is the function I currently have that doesn't seem to be working:

function myFunctionLeft() {
document.getElementById("myAnchor").style.left = "-15px";
document.getElementById("myAnchor").style.align = left;

Is there a different way I should be trying to move the text align to the left?

Aucun commentaire:

Enregistrer un commentaire