更改菜单项的语言

时间:2018-08-15 01:42:18

标签: javascript arrays chinese-locale multiple-languages

我正在尝试向我创建的菜单添加新的语言环境和语言更改选项。

下面您可以看到到目前为止我取得的进步的代码

基本上,我希望在单击“中文”单选按钮后,将“体育”和“地区”的菜单项更改为中文。我的JavaScript技能很低,因此在实现此目标方面遇到问题。由于这是简短的清单,我可以毫无问题地写中文,所以我认为可能有一个简单的解决方法,但是到目前为止,我还没有取得任何进展。对此的任何建议都值得赞赏。

<body>

  <form action="">
    <input type="radio" name="language" value="english">English<br>
    <input type="radio" name="language" value="chinese">中文<br>
  </form>

</body>

<b>Find your sport</b>
<form>
  <select name="Sports">
    <option value="basketball">Basketball</option>
    <option value="football">Football</option>
    <option value="badminton" selected>Badminton</option>
    <option value="table tennis">Table Tennis</option>
    <option value="swimming">Swimming</option>
    <option value="billiards">Billiards</option>
    <option value="archery">Archery</option>
    <option value="baseball">Baseball</option>
    <option value="bowling">Bowling</option>
    <option value="climbing">Climbing</option>
    <option value="darts">Darts</option>
    <option value="fencing">Fencing</option>
    <option value="golf">Golf</option>
    <option value="squash">Squash</option>
    <option value="tennis">Tennis</option>
  </select>
</form>


<b>Find your district</b>
<form>
  <select name="Districts">
    <option value="xuhui">Xuhui</option>
    <option value="jingan">Jingan</option>
    <option value="huangpu" selected>Huangpu</option>
    <option value="changning">Changning</option>
    <option value="pudong">Pudong</option>
    <option value="putuo">Putuo</option>
    <option value="hongkou" selected>Hongkou</option>
    <option value="yangpu">Yangpu</option>
    <option value="minhang">Minhang</option>
    <option value="songjiang">Songjiang</option>
    <option value="qingpu" selected>Qingpu</option>
    <option value="jiading">Jiading</option>
    <option value="baoshan">Baoshan</option>
    <option value="fengxian">Fengxian</option>
    <option value="jinshan" selected>Jinshan</option>
    <option value="chongming">Chongming</option>
  </select>
</form>

<form method="post" name="form1" id="form1">
  <input id="submit" name="submit" type="submit" value="Submit" onclick="getVenues();" />
</form>

0 个答案:

没有答案