html明确占位符提交[关闭]

I am using placeholder attribute provided in html 5 to get placeholder effect.

<input id="search" class="hasPlaceholder" type="text" placeholder="Personal Trainer" 
value="" name="search">

also I have added code to clear the placeolder on submit.

$(function() {
    if(!$.support.placeholder) { 
        var active = document.activeElement;
        $(':text').focus(function () {
            if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) {
                $(this).val('').removeClass('hasPlaceholder');
            }
        }).blur(function () {
            if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) {
                $(this).val($(this).attr('placeholder'));
                $(this).addClass('hasPlaceholder');
            }
        });
        $(':text').blur();
        $(active).focus();
        $('form').submit(function () {
            $(this).find('.hasPlaceholder').each(function() {

                var input = $(this);
                input.removeClass('hasPlaceholder');

                if (input.val() == input.attr('placeholder')) {
                input.removeAttr('placeholder');
                input.val("");
            } 
            });
        });
    }
});

but still it gives placeholder value after submit.

When I entered the last part of your question (Please suggest where i can get list of all Occupation/Industry in excel format) into google, I came across this link on page 1. It has a link to this spreadsheet which contains the exact thing you are looking for. I like helping folks, but seriously, do a little research and googling first.

11-0000             Management Occupations
    11-1000         Top Executives
        11-1010     Chief Executives
            11-1011 Chief Executives
        11-1020     General and Operations Managers
            11-1021 General and Operations Managers
        11-1030     Legislators
            11-1031 Legislators

Example Data.