x
 
<html>
<head>
<style type="text/css">
p
{ 
text-align: right;
}
</style>
<script type="text/javascript">
function changeMargin()
{
document.getElementById("p1").style.marginRight="32px";
}
</script>
</head>
<body>
<input type="button" onclick="changeMargin()" value="Change the right margin of a paragraph" />
<p>This is a paragraph</p>
<p id="p1">This is a paragraph</p>
<p>This is a paragraph</p>
</body>
</html>