How to get the name of Account as alert in visualforce page. I tried getting name of the user using below code.
<apex:page standardController="Account" recordSetVar="Accounts" sidebar="False" showHeader="false">
<apex:form >
<apex:pageBlock title="Hello {!$User.FirstName}!">
<apex:pageBlockSection title="Details">
<apex:pageBlockTable value="{!Accounts}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{!a.type}"/>
<apex:column value="{!a.Website}"/>
<apex:column value="{!a.NumberOfEmployees}"/>
<apex:column headerValue="Details">
<apex:commandButton value="Details" onClick="alert('{!$User.FirstName}')"/></apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Can anyone help me displaying Name of the Account on alert.