-1

in IPhone safari browser, i am loading html page which contains href.ie,

function getxxxx(link) {
            var call1 = document.getElementById('CALL1');
            if (call1 && call1.innerHTML) {
                  link.href = "tel:" + call1.innerHTML;
                  alert(link.href);
                  return true;
            }
            return false;
      }

I’m invoking the script like this,

<tr>
      <td><a class="statuscontent" href="#"
                        onclick="getxxxx(this)">
            <div class="imageContainer1">Call</div>
      </a></td>
      <td>
            <div id="CALL1" class="statuscontent"><%=custCareNumber1%></div>
      </td>
</tr>

while loading this page in I Phone safari browser,getting the error "ahref"tel+188828600000">+188828600000". In other browsers or other phones like android are working fine.

4

1 回答 1

0

尝试call1.text代替innerHTML

于 2012-05-09T13:30:01.097 回答