0

ajax加载中的引导电话表单助手?不工作..但它不适用于 ajax 调用,试图 index.php

索引.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Deneme</title>
<link href="inc/bootstrap/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
<script src="inc/jquery/jquery-1.10.1.min.js"></script>
<script src="inc/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="inc/bootstrap/js/bootstrap-formhelpers-phone.format.js"></script>
<script type="text/javascript" src="inc/bootstrap/js/bootstrap-formhelpers-phone.js"></script>

</head>

<body>
    <script type="text/javascript"> 
        $(document).ready(function(){
        $('#testdiv').load('examples.php');

        });
    </script>

    <div id="testdiv"></div>
</html>

例子.php

<form id="kayit" class="form-horizontal">
<div class="control-group">
            <label class="control-label">Cep Telefonu</label>
            <div class="controls">
                <div class="input-prepend">
                <span class="add-on"><i class="icon-th-list"></i></span>
                    <input type="text" class="input-xlarge bfh-phone" name="CepTelefonu" data-format="+dd (ddd) ddd-dddd-dd">
                </div>
            </div>
        </div>
      </form>

不工作...

4

1 回答 1

0
$('#testdiv').load('examples.php',function(){
$('form input[type="text"].bfh-phone, form input[type="tel"].bfh-phone, span.bfh-phone').each(function () {
var $phone = $(this);
$phone.bfhphone($phone.data());
});
});
于 2013-09-23T13:04:39.720 回答