兼容的做法是:<input type="text" name="t1" id="t1" value="aa"><input type="button" value="button" onclick="documnet.getElementById('t1').value = 'bbb';">