Click on the Safari menu item, then select the Preferences ... sub menu item.
With the Preferences window open, click on the Security tab.
Under the Web content: section make sure that Enable JavaScript is checked.
Close the Preferences window and reload any active tabs to apply the setting.