Considering that your input
is:
<input type="text" value="João Paulo Silva" id="nome" />
You can return the name in the format specified in the question using the function in the code below.
The function will discard the middle names (as well as parts of the name, such as ", " , > , ", " and > Silva ), just get the first and last names and concatenate a "dot." in the middle of the two, besides converting everything to lowercase and eliminate possible accentuations:
function nomeAbrev(){
var nome = $("#nome").val().toLowerCase();
var reg_ex = "/ de | do | dos | da | das | e /i";
nome = nome.replace(reg_ex," ").split(" ");
nome = nome.shift()+"."+nome.pop();
var acentos = "ãáàâäéèêëíìîïõóòôöúùûüç";
var sem_acentos = "aaaaaeeeeiiiiooooouuuuc";
for(var x=0; x<nome.length; x++){
var str_pos = acentos.indexOf(nome.substr(x,1));
if(str_pos != -1){
nome = nome.replace(acentos.charAt(str_pos),sem_acentos.charAt(str_pos));
}
}
console.log(nome);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><inputtype="text" value="João Paulo Silva" id="nome" />
<br />
<input type="button" value="Clique para Converter" onclick="nomeAbrev()" />