单项选择题

运行下列程序代码var str="12px";var s=str.indexOf("2");alert(s);则输出结果是:()

A.输出2
B.输出s
C.输出12
D.输出1