A G-quadruplex is identified which can exhibit two different motifs, respectively, corresponding to Na(+) and K(+). The relative amount of each motif is related to the Na(+)/K(+) ratio. Based on selective recognition of the G-quadruplex motifs by a cyanine dye aggregate, a method for both colorimetric and quantitative measurements of Na(+)/K(+) ratios is constructed.