Thursday, December 6, 2012

style.wordSpacing

Properti style.wordSpacing digunakan untuk menetapkan tambah atau kurang jarak spasi antar kata.

Sintaks:

obj.style.wordSpacing: value;

Nilainya:

  • normal (default)
  • Length
  • inherit

Contoh:

<HTML> <HEAD> <TITLE>style.wordSpacing</TITLE> <SCRIPT TYPE="text/javascript"> function changewordSpacing() { document.getElementById("myp").style.wordSpacing = "10px"; } </SCRIPT> </HEAD> <BODY> <P ID="myp">Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum... Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum... Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum... Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum... Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum...Lorem ipsum...</P> <BUTTON TYPE="button" ONCLICK="changewordSpacing()">Change word spacing!</BUTTON> </BODY> </HTML>