这是我的代码: https: //jsfiddle.net/hsf4yo5t/
HTML 代码:
<input type="button" id="my-button" value="Show text input">
<input type="text" id="my-input">
Run Code Online (Sandbox Code Playgroud)
CSS代码:
#my-input {
visibility: hidden;
}
Run Code Online (Sandbox Code Playgroud)
JavaScript 代码:
document.getElementById('my-button').onclick = function() {
document.getElementById('my-input').style.visibility = 'visible';
}
Run Code Online (Sandbox Code Playgroud)
当我单击按钮时,它会显示。但我怎样才能使用 javascript 或 jquery 让它滑出呢?
我正在创建一个Web应用程序:
付款成功且卡已收费(不拒收)时,我需要更新数据库。
我的代码在这里:我首先创建客户。(顺便说一句,变量已声明,一切正常)
$customer = \Stripe\Customer::create(array(
'email' => $_POST['stripeEmail'],
'source' => $_POST['stripeToken'],
'description' => $stripeEmail
));
Run Code Online (Sandbox Code Playgroud)
然后为客户创建订阅:
$subscription = \Stripe\Subscription::create(array(
"customer" => $customer->id,
"plan" => $planName
));
Run Code Online (Sandbox Code Playgroud)
我的问题:我是否需要创建一个网络挂钩来检测付款是否成功?还是成功提交表单后成功?
我试图将三个div并排放在div中间的间距.
这是我目前的代码:
<style>
.box {
float: left;
width: 33%;
background-color: red;
text-align: center;
color: #fff;
}
</style>
<div class="box">Div 1</div>
<div class="box">Div 2</div>
<div class="box">Div 3</div>
Run Code Online (Sandbox Code Playgroud)
我当前代码的问题是它在div 1和2以及div 2和3的中间没有我需要的间距.
我想从数组中选择5个随机ID。这是我的数组$test
:
Array
(
[id] => 13
[pets] => 8
)
Array
(
[id] => 15
[pets] => 8
)
Array
(
[id] => 16
[pets] => 10
)
Array
(
[id] => 17
[pets] => 9
)
Array
(
[id] => 18
[pets] => 10
)
Array
(
[id] => 19
[pets] => 10
)
Array
(
[id] => 20
[pets] => 0
)
Array
(
[id] => 21
[pets] => 8
)
Array
(
[id] => 22 …
Run Code Online (Sandbox Code Playgroud)