this.value现在是$(“#style_background”),我需要将其更改为$(“。selector”)值。我怎样才能做到这一点。如何在点击功能中使用this.value其他元素
$("#style_background").click(function(){
if ($(".selector").is(":checked")) {
document.cookie = "background=" + this.value + ";" + "path=/";
disable($('#style_background'));
notification('success', 'record updated successfuly', 'topRight');
} else {
disable($('#style_background'));
notification('alert', 'restart your browser', 'topRight');
}
});
写传递一个DOM元素作为帕拉姆 – ThisGuyHasTwoThumbs