JavaScript selecting image to an img tag

后端 未结 4 1997
余生分开走
余生分开走 2021-01-18 06:56

I have a fake profile system for a class project, it requires a profile picture, and it needs an option to change it locally (from your hard drive). I have a working i

4条回答
  •  温柔的废话
    2021-01-18 07:59

    I believe the code is:

    var link = document.getElementById('unpload').value;
    

    Update after AstroCB's comment:

    You could then use:

    var link_split = link.split('\');
    var link = link_split.length;
    

    Or something similar I'm not 100% sure of the syntax maybe someone can help you out a bit more

提交回复
热议问题