我正在寻找定义一个变量:
var alumniName = // id from a list ( example: <li id="JoeJohnson">Joe Johnson</li> ).
我希望变量与访问者点击的内容相匹配。(例子:
<li id="JoeJohnson">Joe Johnson</li>
// when a visitor clicks on the name Joe Johnson... the variable = JoeJohnson
<li id="FredSmith">Fred Smith</li>
// when a visitor clicks on the name Fred Smith... the variable = FredSmith
ETC... )
非常感谢任何帮助-谢谢-