1
HTMLとPHPを組み合わせ:すべてのdivの下にjqueryの - PHPは変数と出力結果
<?php $a = 1380; ?>
<script>
<?php $b = document.write(month); ?>
</script>
<div id="firstshow">
<div id="test1">
<div class="col-xs-5 text-right">
<b><?php echo $a/$b; ?> €/month</b><!-- the result I wish to divide $a from $b -->
</div>
</div>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><b class="pull-left">36</b>per month
<i class="fa fa-chevron-down pull-right" aria-hidden="true"></i></button>
<ul class="dropdown-menu">
<li><a href="#">12</a></li>
<li><a href="#">24</a></li>
<li><a href="#">36</a></li>
</ul>
</div>
</div>
は、この(下記)のjQueryのスクリプトです。
私はjqueryのの結果として変数月にPHPで動的変数$ aを組み合わせて、2にそれらを分割しようとしています
$("#firstshow .dropdown-menu li a").click(function(){
var month = $('#firstshow button b').text($(this).text());
});
のjQuery。
を。 ?> '? – Dekel
この場合、結果は36です。 –
[クライアント側とサーバー側のプログラミングの違いは何ですか?](http://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server - –