當某個div, span, p內容有異動會想連帶做些什麼事時,這個可就好用了
jquery version:
$('mydiv').bind("DOMSubtreeModified",function(){
alert('changed');
});
// javascript version someElement.addEventListener("DOMAttrModified", function() { //... }, false);
當某個div, span, p內容有異動會想連帶做些什麼事時,這個可就好用了
jquery version:
$('mydiv').bind("DOMSubtreeModified",function(){
alert('changed');
});
// javascript version someElement.addEventListener("DOMAttrModified", function() { //... }, false);