62,046
社区成员
发帖
与我相关
我的任务
分享
<input name="gName" onkeyup="isName(this);" type="text" />
<script type="text/javascript">
function isName(obj) {
var nullStr = $('input[name=gName][value=]');
if (nullStr.length == 0) {
$('input[name=gName]').last().after('<input name="gName" onkeyup="isName(this);" type="text" />');
}
else {
if ($(obj).val() == '') {
nullStr.not(obj).remove();
}
}
}
</script>