Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
function pad(num, size) { var s = (num+1)+""; while (s.length < size) s = "0" + s; return s; } pad(004, 3); pad(005, 3)
var re = /(\w+)\s(\w+)/; var str = "John Smith"; var newstr = str.replace(re, "$2, $1") // "Smith, John"
jQuery('.your-element').attr('data-tilt', '')
animateOut: 'slideOutUp', animateIn: 'slideInUp'
function get_contents() { file_get_contents("http://example.com"); var_dump($http_response_header); }
if ( location.pathname == '/pages/page1/' ) { $('.obj').css('color', 'red'); }
if ( location.pathname == '/pages/page1/' ) { $('.obj').addClass('obj2'); }
overflow-x: auto;
<?php header('Content-Type: application/json'); $res = '..'; $data = array( 'html' => '<div class="new">'.$res.'</div>' ); echo json_encode($data);