Javascript examples for CSS Style Property:wordSpacing
Return the word spacing of a <p> element:
<!DOCTYPE html> <html> <body> <p id="myP" style="word-spacing:10px;">This is an example paragraph.</p> <button type="button" onclick="myFunction()">Return word spacing of p</button> <script> function myFunction() {//from ww w . j av a 2s. com console.log(document.getElementById("myP").style.wordSpacing); } </script> </body> </html>