Das "readonly"-Attribut muss innerhalb des HTML-Tags stehen.