Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/429.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript JQuery和bootstrap3很容易解决_Javascript_Php_Jquery_Twitter Bootstrap 3 - Fatal编程技术网

Javascript JQuery和bootstrap3很容易解决

Javascript JQuery和bootstrap3很容易解决,javascript,php,jquery,twitter-bootstrap-3,Javascript,Php,Jquery,Twitter Bootstrap 3,我有一个简短的问题 因此,我的代码类似于: <html> <head> </head> <body> <?php //file that contains the modals include ('modals.php'); <button class="openCompany"> OPEN </button> ?> //... </body> <

我有一个简短的问题 因此,我的代码类似于:

<html>
<head>
</head>
<body>

<?php
    //file that contains the modals
    include ('modals.php');
    <button class="openCompany">
        OPEN
    </button>
?>
//...
</body>
</html>
不再是了

谢谢。

试试这个

  $(document).ready(function(){    
       $(document).on("click", ".openCompany", function(e) {
       $('#companyModal').modal('show');
    });
   });
$(".openCompany").click(function () {
    $('#companyModal').modal('show');
});
  $(document).ready(function(){    
       $(document).on("click", ".openCompany", function(e) {
       $('#companyModal').modal('show');
    });
   });