UK[left] 美[lɛft]
adj. Left, left; leftist
n. Left, left; [military] left; left, radical
adv.To the left; on the left side
v.Leave (past tense and past participle of leave)
Plural: lefts
javascriptleftproperty syntax
Function: Set the offset between the left margin boundary of the positioned element and the left boundary of its containing block.
Syntax: Object.style.left=auto|%|length
Comments: If the value of the "position" attribute is "static" , then setting the "left" attribute will have no effect.
javascriptleftproperty example
<html> <head> <style type="text/css"> input { position:absolute; } </style> <script type="text/javascript"> function setLeftEdge() { document.getElementById("b1").style.left="100px"; } </script> </head> <body> <input type="button" id="b1" onclick="setLeftEdge()" value="Set left edge to 100 px" /> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance