Among the above described substituted nitrogen-containing compounds, preferable are the melamine compounds represented by the general formula ##STR4## in which each of the six groups denoted by R5 and R6 is a hydrogen atom, methylol group or alkoxymethyl group with the proviso that at least two of the six groups are methylol or alkoxymethyl groups, in respect of the good crosslinkability.