Phorum.ro
Your Avatar Welcome to Phorum.ro!
If you haven't registered yet, click here!
Attention Visitor:
You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Du-te înapoi   Phorum.ro > Web Design & Web Development > Programare > Java > Discutii Generale

Discutii Generale In general despre Java.

Răspunde
 
Thread Tools Moduri de afișare
Vechi 02.06.2006   #1
Totenkopf
32-Bit Member
 
Totenkopf's Avatar
 
Data înregistrării: 03.11.2005
Locație: Bucuresti
Vârsta: 22
Mesaje: 119
Rep Power: 7
Totenkopf is on a distinguished road
Implicit w3scools nu ma prea ajuta...voi?

deci ideea e ca am fost la scoala acu cateva zile si am vazut pe unu cum se jucat in javascript...
si am incercat sa reproduc si eu...
eu am cunostinte f mici de javascript...si ceva nu merge...tutoriale...canci...nimic sa inteleg si eu...si cunostintele de c++,php, si html...nu au fost de mare folos...html da nu cinestie ce...
deci am o imagine simpla normala...si cand dau click sa apara border in juru ei...la click din nou sa dispara borderu
si o chestie de genu asta la text...
cand sunt cu mouseul deasupra la o sectiune de text... sa se bolduiasa de exemplu
uitati ce am facut pana acum...si nu merge
Citat:
<html>
<head>
<script type="text/javascript">
<!--
function bordeaza()
{
document.write('<img src="s7.jpg" onclick="debordeaza()" border="1">')
}
function debordeaza()
{
document.write('<img src="s7.jpg" onclick="bordeaza()" border="0">')
}
//-->
</head>
<body>
<img src="s7.jpg" onClick="bordeaza();">
</body>
</html>
__________________
Ce nu te omoara, te face mai puternic.
Totenkopf is offline   Reply With Quote
Sponsored Links
Vechi 03.06.2006   #2
Osgiliath
64-Bit member
 
Data înregistrării: 21.03.2006
Mesaje: 209
Rep Power: 0
Osgiliath is on a distinguished road
Implicit

Pai nu faci cum trebuie

imaginii ii asignezi un id

<img src="something" id="test" onclick="Set_Border('test');" style="border:0px" />

apoi faci o functie Javascript care sa-ti modifice atributul border pentru elementul cu id-ul dat de tine

Cod:
function Set_Border(a)
{
    btype = document.getElementById(a).getAttribute('border');
    if (btype == '1px') document.getElementById(a).setAttribute('border', '0px');
    else document.getElementById(a).setAttribute('border', '1px');
}
Ceva de genul asta. Sunt obosit si sper ca nu am gresit cu ceva.
Osgiliath is offline   Reply With Quote
Vechi 03.06.2006   #3
Totenkopf
32-Bit Member
 
Totenkopf's Avatar
 
Data înregistrării: 03.11.2005
Locație: Bucuresti
Vârsta: 22
Mesaje: 119
Rep Power: 7
Totenkopf is on a distinguished road
Implicit

de inteles sa ziceam ca am inteles ce ai scris tu acolo...da nu mere...
__________________
Ce nu te omoara, te face mai puternic.
Totenkopf is offline   Reply With Quote
Vechi 03.06.2006   #4
Osgiliath
64-Bit member
 
Data înregistrării: 21.03.2006
Mesaje: 209
Rep Power: 0
Osgiliath is on a distinguished road
Implicit

There you go. Mai odihnit ca ieri

Cod:
<html>
<head>
<script>
function Set_Border(a)
{
    btype = parseFloat(document.getElementById(a).getAttribute('border'));
    if (btype == 1) document.getElementById(a).setAttribute('border', 0);
    else document.getElementById(a).setAttribute('border', 1);
}
</script>
</head>
<body>
<a href="javascript:;" onclick="Set_Border('test');"><img src="f_new.gif" id="test" border="0" /></a>
</body>
</html>
Osgiliath is offline   Reply With Quote
Răspunde


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Moduri de afișare

Reguli de postare
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Pornit
emoticoanele sunt Pornit
Codul [IMG] este Pornit
Codul HTML este Oprit



Ora este GMT +3. Ora este acum 02:56:42.


Rulează cu: vBulletin Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum SEO by Zoints

XXXXXXXXXXXXXXXXXXX
Inactive Reminders By Icora Web Design