How can I take admin/insertShoutBox in action="admin/insertShoutBox" with jquery?
I want to change action="admin/insertShoutBox" to action="" with jquery.
Can anyone tell me how to please?
Thanks in advance.
<div id="homeright" class="adminhome">
<form method="post" id="form" action="admin/insertShoutBox" >
<input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id;?>" />
<input type="hidden" name="user" id="nick" value="<?php echo $username;?>" />
<p class="messagelabel"><label class="messagelabel">Message</label>
<textarea id="message" name="message" rows="2" cols="40"></textarea>
<input id="send" type="submit" value="SUBMIT" /></p>
</form>
开发者_运维百科...
...
Use the attr method on the form:
$('form#form').attr('action', '');
精彩评论