pass parameter and get parameter with div tag in jquery
Trang 1 trong tổng số 1 trang
pass parameter and get parameter with div tag in jquery
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:
pass parameter to tag in jQuery:
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:
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:
before:
After:
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">
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|