I already have this :
You can use callback function of .attr()
to modify existing value:
$('#ListSujet option').attr('value',function(i,o){
return o.substring(0, o.indexOf(','))
});
Working Snippet:
$('#ListSujet option').attr('value',function(i,o){
return o.substring(0, o.indexOf(','))
});
$("#ListSujet").on("change",function(){
console.log($(this).val());
});