php - How to use a tag for input type submit -


<form>     <label class="screen-reader-text" for="s"><?php _x( 'search for:', 'label' ); ?></label>     <input type="text" value="<?php echo get_search_query(); ?>" name="s" id="s" placeholder="search"/>     <input type="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'search', 'submit button' ); ?>" /> </form> 

how use tag input type button. tag cod is:

  <a href="#" class="fa fa-search" ></a> 

by default submit uses form action redirect on submit.

<form method="post" action="redirect.html">   <input type="submit" value="clickable button" /> </form> 

or

<!-- form here --> <button type="submit" form="form2" value="submit">submit</button> 

if want create form doesn't have action may use button tag within a link it.

or want input button redirects:

<form>    <input type="button" onclick="parent.location='https://www.google.com/'" value="google" />  </form>


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -