ThienThanCNTT
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

pass parameter and get parameter with div tag in jquery

Go down

pass parameter and get parameter with div tag in jquery Empty pass parameter and get parameter with div tag in jquery

Bài gửi by nth 21/11/11, 04:12 pm

ax.. Sau 1 ngày ngồi xem mới phát hiện ra, lúc đầu tưởng truyền tham số dùng jQuery.param() =.=
sau đó mới phát hiện ra:
get value tab in jquery:
var point = $("#camera").attr("value");

pass parameter to tag in jQuery:
$("#camera").val(e);


Cái val này cũng có nhìu nghi vấn lắm, mình chưa ưng ý với nó lắm, trong 1 số trường hợp truyền tham số cố định. Mọi thông tin lên trang jquery xem nhé. key: jQuery.val() cho anh google nhá!.

Tóm tắt như sau:

jQuery.val()
Content: .val(), .val(value)
Description: get value the current value of the first element in the set of matched element.
ext:
$("input").keyup(function(){
var value=$(this).val();
$("p").text(value);
}).keyup();


val() function - DOM manipulation
this function gets the value set in a form field. If there is a value between quotes inside the brackets it changes the current value of given field for that one.
ext:
$("#input_2").val("Oanh iu");

before:
<input id="input_1" value="hello">
<input id="input_2" value="Huong">

After:
<input id="input_1" value="hello">
<input id="input_2" value="Oanh iu">


Smile
nth
nth
Admin
Admin

Tổng số bài gửi : 550
Số điểm : 1113
Số lần được cám ơn : 33
Ngày đến diễn đàn: : 01/08/2009
Tuổi : 35
Đến từ : Thiên Đường

https://thuhuong.forumvi.net

Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết