This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var args = {}; | |
(location.search || '').replace(/^\?/, '').replace(/([^&=]*)(?:=([^&]*))?/g, function(m, k, v) { | |
if (v) { | |
args[k] = decodeURIComponent(v); | |
} | |
return ''; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"abc" | |
<?= 124 ?> | |
<?= a ?> | |
<? local x = 12 | |
if math.random(1, 5) > 1 then ?> | |
xxx | |
<? else ?> | |
yyy | |
<? end ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function base (digit_list) | |
local b = #digit_list | |
if b == 0 then | |
return function(number) return "" end | |
elseif b == 1 then | |
local mark = digit_list[1] | |
return function(number) | |
return string.rep(mark, number) | |
end | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//调用idIncrement(“quizForm.quiz.questions[0].options[0].textContent” , "questions")的时候返回 | |
// quizForm.quiz.questions[1].options[0].textContent | |
//调用idIncrement(“quizForm.quiz.questions[0].options[0].textContent” , "options")的时候返回 | |
// quizForm.quiz.questions[0].options[1].textContent | |
function idIncrement(s,p){ | |
return s.replace(new RegExp('(' + p + '\\[)(\\d+)\\]'), function($a,$1,$2){ | |
return $1 + ((parseInt($2, 10) || 0) + 1) + ']'; | |
}); | |
} |
NewerOlder