Copy and paste the following script.
<script language="ecmascript" type="text/ecmascript">
var group;
function getGroupOwner() {
var clientContext = new SP.ClientContext();
var groupCollection = clientContext.get_web().get_siteGroups();
group = groupCollection.getById(7);
clientContext.load(group);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded() {
alert(group.get_title() + " group owner - " + group.get_ownerTitle());
}
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}</script>
<input id="btnGetGroupOwner" onclick="getGroupOwner()" type="button" value="Get Group Owner" />