String problem that bootstrap modal box pass parameters can only pass numeric type

Update

resolved

main problems

can bootstrap modal box pass parameters only pass strings of numeric type?

background description of the problem and my attempt

question background:
I am writing a web page with jsp, in which there is a table with a picture link in each row of the table. Now I want to trigger the modal box by clicking the button, and the picture is displayed in the body of the modal box. Find a way on the Internet to pass the SRC value to the img in the modal box.

example:

    There is a button in the
  • table that triggers the modal box, onclick= "showImg (imgUrl)"
  • there is an img tag in the modal box body, and id is "theImgUrl".
  • The
  • js function is:
function showImg(imgUrl){
    $("-sharptheImgUrl").attr("src",imgUrl);
}

my test

  1. I thought my imgUrl was empty, but checking the data is not empty, which confirms
  2. I replaced the img tag in the modal box body with input. Using the above value passing method, I found a problem: I can pass a string like "1233000" to input, but not others, including strings with non-numeric characters such as English and Chinese
  3. looked up related questions on the Internet, but found no similar questions and answers. So I wonder what I did wrong.

so, repeat my question

can bootstrap modal box pass parameters only pass strings of numeric type?
I understand that this should not be the case, but how to solve the problem I encountered? Has any of the great gods encountered this problem?

p. S. : I do the back-end, the front-end is basically not, these two days saw some bootstrap things, do a simple page encountered this problem. Let me ask you something.

Thank you


after clicking the button, open the console shift+ctrl+c to view your-sharptheImgUrl dom.

The case of

input may have something to do with the input type you set

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e84347-cbf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e84347-cbf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?