I have a page , I need to Add a Picture from the web using it's URL and display it in my page same as the below image using Jquery or Javascript.
Asked
Active
Viewed 822 times
0
-
1And what's the question and where is the code that failed you after having spent few hours doing it? – lshettyl Jun 08 '15 at 12:40
-
enchine marre.. surukke mool points ijind yaan sayyond ulle.. eer kuda down vote malthondullar.. – Sushanth Shetty Jun 08 '15 at 12:45
-
do this by using any jquery plugin.. You can find it here... http://www.bestfreewebresources.com/20-awesome-jquery-file-uploader-plugins – Prasanth Jaya Jun 08 '15 at 12:53
2 Answers
0
You need to have a textbox where you can enter the url for the image and a button to attach an event.
var button = document.getElementById("button"),
input = document.getElementById("input"),
image = document.getElementById("image"),
src;
// button click event
button.onclick = function(){
// in case you want to use somewhere else
src = input.value;
// set the image src to the input value
image.src = src;
}
<input id="input" type="text"/>
<button id="button">click me</button>
<img id="image" height="200px"/>

rssfrncs
- 991
- 4
- 19
0
- It just updates the image 'src' attibute and shows the image. and which is not saved ,and its not performing like input type ='file'.

Jayanth Suvarna
- 187
- 2
- 9