Home > Jquery > Jquery action form target blank

Jquery action form target blank

Để submit một form ra một cửa sổ mới (hoặc new tab)

Ví dụ:


form id="frm_product" action="" name="frm_product" > .... </form

$("#frm_product").attr("action", urlSubmit); 
$("#frm_product").attr("target", '_blank'); 
$("#frm_product").submit();

Chúng ta thêm khai báo thuộc tính

attr("target", '_blank'); 

Chúc các bạn thành công

PHP Developer
nhantam

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: