wordpress评论,点击输入文本框,文字消失 30
<?php//createnewcommentformfunctionwplook_comment_form($args=array(),$post_id=null){g...
<?php
// create new comment form
function wplook_comment_form( $args = array(), $post_id = null ) {
global $user_identity, $id;
if ( null === $post_id )
$post_id = $id;
else
$id = $post_id;
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array(
'author' => '<p class="comment-form-author">' . ( $req ? '<span class="required"></span>' : '' ) .
'<input id="author" name="author" type="text" value="填入昵称 ... " ' . esc_attr( $commenter['comment_author'] ) . '" size="18"' . $aria_req . ' /></p>',
'email' => '<p class="comment-form-email">' . ( $req ? '<span class="required"></span>' : '' ) .
'<input id="email" name="email" type="text" value="填入邮件地址 ... "' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
'url' => '<p class="comment-form-url">' .
'<input id="url" name="url" type="text" value="填入个站地址 ... "' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
);
如何修改以上代码,得以实现点击消失,点击他处显示。 展开
// create new comment form
function wplook_comment_form( $args = array(), $post_id = null ) {
global $user_identity, $id;
if ( null === $post_id )
$post_id = $id;
else
$id = $post_id;
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array(
'author' => '<p class="comment-form-author">' . ( $req ? '<span class="required"></span>' : '' ) .
'<input id="author" name="author" type="text" value="填入昵称 ... " ' . esc_attr( $commenter['comment_author'] ) . '" size="18"' . $aria_req . ' /></p>',
'email' => '<p class="comment-form-email">' . ( $req ? '<span class="required"></span>' : '' ) .
'<input id="email" name="email" type="text" value="填入邮件地址 ... "' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
'url' => '<p class="comment-form-url">' .
'<input id="url" name="url" type="text" value="填入个站地址 ... "' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
);
如何修改以上代码,得以实现点击消失,点击他处显示。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询