在各种浏览器中兼容jquery代码
I have a simply code:
<?php
if( isset($_POST['cnt']) ) {
$_SESSION['counter'] += 1;
}
echo $_SESSION['counter'];
echo '<button id="b1">Count</button>';
?>
<script>
$("#b1").click(function(){
$.post("index.php", { cnt: 1 });
location.reload();
});
</script>
The script without problems counts clicks on Chrome or Edge, but it completely doesn't work on FF and IE. Where could be the problem ?
du521521521
2015/12/26 18:13- php
- compatibility
- javascript
- jquery
- 点赞
- 收藏
- 回答
满意答案