我有以下jQuery函数:
<script type="text/javascript">
$(function() {
// setTimeout() function will be fired after page is loaded
// it will wait for 5 sec. and then will fire
// $("#successMessage").hide() function
setTimeout(function() {
$("#subscribe-floating-box").animate({"height": "toggle"}, { duration: 300 });
}, 3000);
});
</script>
<script type="text/javascript">
function ShowHide(){
$("#subscribe-floating-box").animate({"height": "toggle"}, { duration: 300 });
}
</script>
Run Code Online (Sandbox Code Playgroud)
我也有以下形式:
<div id="subscribe-floating-box">
<form action="" method="post" accept-charset="utf-8" id="subscribe-blog">
<input type="text" name="email" style="width: 95%; padding: 1px 2px" value="someone@example.com" id="subscribe-field" onclick="if ( this.value == 'Email Address' ) { this.value …Run Code Online (Sandbox Code Playgroud) 我一直在寻找能够控制在textarea中输入的最小字数的函数,并且在用户没有输入最小字数的情况下(250说),一旦他尝试,就会出现警报提交消息.
我正在使用这个主题:http://www.elegantthemes.com/demo/? theme = AskIt
这是表单的提交方式:
<form action="<?php echo(get_permalink($post->ID)); ?>#create_new_post" method="post">
Run Code Online (Sandbox Code Playgroud)
这是textarea代码:
<textarea name="et_newpost_content" id="et_newpost_content" class="input"><?php if ( isset( $_POST['et_newpost_content'] ) ) echo esc_textarea( $_POST['et_newpost_content'] ); ?></textarea>
Run Code Online (Sandbox Code Playgroud)