首页 > 代码库 > javascript里用php

javascript里用php

<script type="text/javascript" >
<?php if (!empty($searchResult)):?>
$.searchModule.init({display:<?php echo MAX_KEYWORDS_DISPLAY_COUNT; ?>,
mode:<?php echo $searchResult->mode; ?>,
query:‘<?php echo (isset($keyword_assistant)?$keyword_queries:$keyword); ?>‘});
$(document).ready(function(){
<?php if (isset($scroll_pos)): ?>
$(this).scrollTop(<?php echo $scroll_pos; ?>);
<?php endif; ?>
$.searchModule.checkSearchStatsRequest();
});
<?php else:?>
$.searchModule.init();
<?php endif;?>
</script>