Unable , HTML5 and JavaScript APIs do not allow such interaction, it would be nice if there were a window that opened asking if the user would like to save, but there is no such functionality.
In iOS (iPhone) if you hold the touch on the link gives the option Add Contacts :
IbelievethatHTMLcanbeasmuchaspossible,however,soVcardcanhelpifyoucreateadocumentwiththeextension.vcf
(andthehttpserverissetupwithcorrectContent-Type
),oryoucansettheheaderofascriptdynamicserver-side(likephp)Content-Type:text/vcard
,withaformatsimilartothis:
BEGIN:VCARDVERSION:3.0N:Doe;John;;;FN:JohnDoeORG:Example.comInc.;TITLE:ImaginarytestpersonEMAIL;type=INTERNET;type=WORK;type=pref:[email protected];type=WORK;type=pref:+16175551212TEL;type=WORK:+1(617)555-1234TEL;type=CELL:+17815551212TEL;type=HOME:+12025551212item1.ADR;type=WORK:;;2EnterpriseAvenue;Worktown;NY;01111;USAitem1.X-ABADR:usitem2.ADR;type=HOME;type=pref:;;3AcaciaAvenue;Hoemtown;MA;02222;USAitem2.X-ABADR:usNOTE:JohnDoehasalongandvariedhistory\,beingdocumentedonmorepolicefilesthatanyoneelse.Reportsofhisdeatharealasnumerous.item3.URL;type=pref:http\://www.example/com/doeitem3.X-ABLabel:_$!<HomePage>!$_item4.URL:http\://www.example.com/Joe/foaf.dfitem4.X-ABLabel:FOAFitem5.X-ABRELATEDNAMES;type=pref:JaneDoeitem5.X-ABLabel:_$!<Friend>!$_CATEGORIES:Work,TestgroupX-ABUID:5AD380FD-B2DE-4261-BA99-DE1D1DB52FBE\:ABPersonEND:VCARD
Openingonyourphoneislikelytoseeascreensimilartothis:
Thentheuserwillnoticethe"Open in Contacts" (in mobile phones in Portuguese the text will be in Portuguese, do not worry)
Source: link