Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
value kao slika
Author Message
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #1
value kao slika
Quote:<input type="text" id="drvo" value='<img src="1.gif" />' />
Naravno, u text boxu samo ispise <img src="1.gif" />, a ne prikaze sliku. Kako napraviti da prikazuje sliku?

Brzo. Jeftino. Kvalitetno. Izaberi dva!
08-11-2008 05:42 PM
Find all posts by this user Quote this message in a reply
Gogy Offline
____
*

Posts: 2,379
Joined: Feb 2006
Post: #2
RE: value kao slika
Ne možeš stavit sliku textbox. Možeš jedino css-om napravit da bude pozadina neka slika.

Pravila foruma | Twitter - Facebook - Google+ |
08-11-2008 05:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #3
RE: value kao slika
Gogy Wrote:Ne možeš stavit sliku textbox. Možeš jedino css-om napravit da bude pozadina neka slika.

Steta... Moze li se napraviti (css-om) da kada se pocne upisivati text nestane ta pozadina?

Brzo. Jeftino. Kvalitetno. Izaberi dva!
08-11-2008 08:05 PM
Find all posts by this user Quote this message in a reply
tutorial Offline
Redoviti posjetitelj
**

Posts: 181
Joined: Jan 2007
Reputation: 6
Post: #4
RE: value kao slika
zero Wrote:Moze li se napraviti (css-om) da kada se pocne upisivati text nestane ta pozadina?

Može uz korištenje pseudo-klase ":focus". Problem je što je ne podržavaju svi preglednici; probaj pogoditi koji.
(This post was last modified: 09-11-2008 01:50 AM by tutorial.)
09-11-2008 01:50 AM
Find all posts by this user Quote this message in a reply
Puž Offline
Redoviti posjetitelj
**

Posts: 132
Joined: Mar 2007
Reputation: 25
Post: #5
RE: value kao slika
Moš javascriptom.
Code:
<html>
<body>

<script>
function test(boks)
{
    boks.style.backgroundImage=""
}
</script>
<input type="text" style="background-image:url(fds.bmp)" onkeyup="test(this)" />


</body>
</html>

Kad bolje razmislim moš i Css-om zapravo:
Code:
<html>
<head>
<style>
.test
{
    background-image: expression(document.getElementById("boks").value?"url('fds.bmp')" : "");

}
</style>


</head>
<body>
    <input class="test" type="text" style="" id="boks"/>

</body>
</html>
(This post was last modified: 09-11-2008 03:23 PM by Puž.)
09-11-2008 02:46 PM
Find all posts by this user Quote this message in a reply
zero Offline
Forumaš
***

Posts: 461
Joined: Jan 2008
Reputation: 10
Post: #6
RE: value kao slika
Puž Wrote:Moš javascriptom.
Code:
<html>
<body>

<script>
function test(boks)
{
    boks.style.backgroundImage=""
}
</script>
<input type="text" style="background-image:url(fds.bmp)" onkeyup="test(this)" />


</body>
</html>

Kad bolje razmislim moš i Css-om zapravo:
Code:
<html>
<head>
<style>
.test
{
    background-image: expression(document.getElementById("boks").value?"url('fds.bmp')" : "");

}
</style>


</head>
<body>
    <input class="test" type="text" style="" id="boks"/>

</body>
</html>

Thx... Koristio sam javascript He he

Brzo. Jeftino. Kvalitetno. Izaberi dva!
10-11-2008 04:25 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)