Loading JSON data and working phone number works fine, but by calling external function Reduced amount of data
The following JSON code:
$ .ajax ({url: url, type: "received", data: {no: val}, data type : "Json", cache: wrong, error: function () {warning ('error')}}, failure: function () {alert ('unsuccessful');} success: work (results) {$ .each ( As a result, work, index, date) {Var site_phone = '& lt; a href = "#" onClick = "Dialto (' + Dat.telephone + ') "& gt; img src =" phone.png "alt =" dial "/> & lt; / a & gt;' $ (" #phone ") and ('& lt ; Div style = "height: 50px; width: 400px; direction: ltr;" & gt; '+ site_phone +' & lt; h2 & gt; '+ dat.telephone +' & lt; / h2 & gt; '+' & Lt; / div & gt; ';});}} Function dialout (telephone) {warning (telephone); Window.open ('Tele:' + telephone + '', '_system');
Try
var site_phone = '& lt; A href = "#" onClick = "Dialto (\ '' + Dat.telephone + '\')" & gt; & Lt; Img src = "phone.png" alt = "dial" /> & Lt; / A & gt; ' Extra \'
Note that you have to send numper as to how to complete it, such as 077-123456
Comments
Post a Comment