CODE (javascript):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- <script>
- $(document).ready(function () {
- var html_output = "";
- for(i = 1; i <= 100; i++){
- if(i <= 8 && i > 1){
- html_output += "<strong id="+i+">"+i+" </strong>";
- }else if(i < 0 && i > 4){
- html_output += "<strong id="+i+">"+i+" </strong>";
- }
- pag.innerHTML = html_output;}
- $('#pag strong').on('click', function(){
- var bb = $(this).attr('id');
- $.ajax({
- url:'index.php',
- type:'GET',
- data: "page="+bb,
- success: function(html) {
- //
- $("#pag").html(html);
- }});});});
- </script>
- </head>
- <body>
- <div id="pag" name="ppp"></div>
- </body>
- </html>