I found the solution:
ctx = new SP.ClientContext.get_current();
//Add code to retrieve current list item...
var newId = 11;//for exmple
var newLookupField = new SP.FieldLookupValue();
newLookupField.set_lookupId(newID);
var existingLookupValue = currList.get_item("Lookup_field_id");
if (existingLookupValue == null) {
// set to a single lookup value because we don’t have an existing value
currList.set_item("Lookup_field_id", newLookupField);
} else if ( existingLookupValue instanceof SP.FieldLookupValue) {
// we need to change from a lookup field value to an array of lookup fields values
var newLookupValue = new Array();
newLookupValue[0] = existingLookupValue;
newLookupValue[1] = newLookupField;
currList.set_item("Lookup_field_id", newLookupValue);
} else if ( existingLookupValue instanceof Array) {
// array already exists, just append
existingLookupValue[existingLookupValue.length] = newLookupField;
currList.set_item("Lookup_field_id", existingLookupValue);
}
currentItem.update();
ctx.executeQueryAsync(Function.createDelegate(this, this.onUpdateLookupSucceeded), Function.createDelegate(this, this.onUpdateLookupFailed));
finally, to set the lookup field empty, you can simply set its value to null
currList.set_item("Lookup_field_id", null);
HTH,
Khalil.