(<script(\stype="text\/javascript")?>)(.*?)(<\/script>)
\1\$\(document\).on\('ready', function\(\) \{\3\}\);\4
function toLatin() {
translate = translate.split('').map((item) => {
let _pos = cyrillic.indexOf(item);
return _pos == -1 ? item : latin[_pos];
}).join('');
};
<form action="server.php" method="POST">
<form action="server.php" method="POST" id="formName">
$('#formName').submit...
UPDATE tbl_name SET date = data WHERE date IS NULL
ALTER TABLE tbl_name DROP COLUMN data;
$this->getErrors()
$(document).ready(function(){
function sameFunc() {
// code
}
}):
var sameFunc = null;
$(document).ready(function(){
sameFunc = function() {
// code
}
}):
success: function () {
alert('updated');
$('#start').load;
}
success: function (data) {
alert('updated');
$('#start').html(data);
}
$str = "abababcdcdcdabab";
$parts = preg_split('/([a-z]{2})/u', $str, 0, PREG_SPLIT_DELIM_CAPTURE);
$parts = array_values(array_filter($parts));
$skip = 0;
$result = '';
foreach($parts as $id => $part) {
$next = isset($parts[$id+1]) ? $parts[$id+1] : false;
if ($part == $next) {
++$skip;
}
if ($skip == 2) {
$skip = 0;
continue;
}
$result .= $part;
}
echo $result;
$str = "abababababcdcdcdcdcdabab";
$parts = preg_split('/([a-z]{2})/u', $str, 0, PREG_SPLIT_DELIM_CAPTURE);
$parts = array_values(array_filter($parts));
$skip = 0;
$last = '';
$result = '';
foreach($parts as $id => $part) {
$next = isset($parts[$id+1]) ? $parts[$id+1] : false;
if ($part == $next) {
++$skip;
} else {
$skip = 0;
}
if ($skip >= 2) {
continue;
}
$result .= $part;
}
echo $result;
$( "#sortable1, #sortable2,#sortable3" ).sortable({
connectWith: ".connectedSortable"
}).disableSelection();
$( function() {
$( "#sortable1" ).sortable().disableSelection();
$( "#sortable2, #sortable3" ).sortable({
connectWith: ".connectedSortable"
}).disableSelection();
} );
$("#btn_delete").on("click", function(){
$(this).parent().remove();
});
$(document).on("click", "#btn_delete", function(){
$(this).parent().remove();
});
$tel = "790000000";
echo sprintf("Номер телефона: %s", $tel);
source: 'search.php',
source: function(request, response) {
$.ajax({
url: "search.php",
method: "GET",
dataType: "json",
data: {
term: request.term,
},
success: function(data){
response(data);
},
});
},