1,904
עריכות
אין תקציר עריכה |
אין תקציר עריכה |
||
שורה 1: | שורה 1: | ||
<html><div class="tab"> | <html><div class="tab"> | ||
<button id="LondonButton" class="tablinks" onclick="openCity(event, 'London')">{{{שם1}}}</button> | <button id="LondonButton" class="tablinks" onclick="openCity(event, 'London')">{{{שם1}}}</button> | ||
<button class="tablinks" onclick="openCity(event, 'Paris')">{{{שם2}}}</button> | <button id="ParisButton" class="tablinks" onclick="openCity(event, 'Paris')">{{{שם2}}}</button> | ||
<button class="tablinks" onclick="openCity(event, 'Tokyo')">{{{שם3}}}</button> | <button id="TokyoButton" class="tablinks" onclick="openCity(event, 'Tokyo')">{{{שם3}}}</button> | ||
</div> | </div> | ||
</html> | </html> | ||
שורה 11: | שורה 11: | ||
<div id="Paris" class="tabcontent"> | <div id="Paris" class="tabcontent"> | ||
<h3>{{{שם2}}}</h3> | <h3 id="ParisTabHeadText">{{{שם2}}}</h3> | ||
<p>{{{תוכן2}}}</p> | <p>{{{תוכן2}}}</p> | ||
</div> | </div> | ||
<div id="Tokyo" class="tabcontent"> | <div id="Tokyo" class="tabcontent"> | ||
<h3>{{{שם3}}}</h3> | <h3 id="TokyoTabHeadText">{{{שם3}}}</h3> | ||
<p>{{{תוכן3}}}</p> | <p>{{{תוכן3}}}</p> | ||
</div> | </div> | ||
שורה 58: | שורה 58: | ||
</style> | </style> | ||
<script> | <script> | ||
document. | document.getElementById("LondonButton").textContent=document.getElementById("LondonTabHeadText").textContent; | ||
document.getElementById("ParisButton").textContent=document.getElementById("ParisTabHeadText").textContent; | |||
document.getElementById("TokyoButton").textContent=document.getElementById("TokyoTabHeadText").textContent; | |||
function openCity(evt, cityName) { | function openCity(evt, cityName) { | ||
// Declare all variables | // Declare all variables |