+ 2

Atrribute Changes

HOW TO CHANGE THE SCRIPT ATTRIBUTE VALUE TO ANOTHER WITH HELP OF JAVASCRIPT ANY BODY WHO CAN HELP ME . SHOW WITH THE HELP OF CODE IN CODE PLAYGROUND

23rd Jul 2018, 9:04 AM
Jitender Kashyap
Jitender Kashyap - avatar
4 ответов
+ 9
Jitender Kashyap to add a script in html you can use this 👇👇👇 document.body.appendChild(document.createElement('script')).src='myjs.js';
23rd Jul 2018, 9:11 AM
Mohammad Amir Aqeel
Mohammad Amir Aqeel - avatar
+ 9
Jitender Kashyap Rather than changing it is easy to add a new script using this 👇 document.body.appendChild(document.createElement('script')).src='myjs.js'; Changing src value of existing script can cause error. So better add a new script.
23rd Jul 2018, 9:21 AM
Mohammad Amir Aqeel
Mohammad Amir Aqeel - avatar
+ 8
Jitender Kashyap Which script attribute ??? src attribute ??
23rd Jul 2018, 9:07 AM
Mohammad Amir Aqeel
Mohammad Amir Aqeel - avatar
+ 2
I want to change the value of src help me
23rd Jul 2018, 9:19 AM
Jitender Kashyap
Jitender Kashyap - avatar