在Page load上触发的propertychange事件

Lol*_*lly 3 javascript jquery jquery-ui

我正在使用textarea并且我已将binded propertychange事件绑定到它.以下是我使用的代码

$('#textareaID').bind('input propertychange', function() {});
Run Code Online (Sandbox Code Playgroud)

但是,只有在页面加载后textarea发生更改时,此事件才会触发.我希望它在页面加载时被触发.因为在页面加载时,我正在分配一个我希望它在那时发生的值.是否可以在页面加载时触发?

Bil*_*ill 7

是否手动触发它?

jsFiddle中的示例:http://jsfiddle.net/VAT83/

$(function() {
    var textValue = $('#textValue');        
    $('#textareaID')
         .bind('input propertychange', function() {
             textValue.html($(this).val());
         })
         .trigger('propertychange');
});?
Run Code Online (Sandbox Code Playgroud)