SyntaxFix
Write A Post
Hire A Developer
Questions
If you are in a SharePoint Page just use:
_spPageContextInfo.userId;