add/remove input element dynamically

the jquery feature doesn’t work until the version is newer than or
equal to 1.7.4.