Js onclick='function';
kiko
-
kiko -
kiko -
Bonjour,
je ne comprends pas pourquoi ce code ne passe pas :
var body = document.getElementsByTagName('body')[0],
p = document.cretateElement('p'),
p1 = document.cretateElement('p'),
input = document.createElement('input'),
input1 = document.createElement('input');
input.onclick='da';
input1.onclick='da';
p.appendChild(input);
body.appendChild(p);
p1.appendChild(input1);
body.appendChild(p1);
function da(){alert('ok')}
je ne comprends pas pourquoi ce code ne passe pas :
var body = document.getElementsByTagName('body')[0],
p = document.cretateElement('p'),
p1 = document.cretateElement('p'),
input = document.createElement('input'),
input1 = document.createElement('input');
input.onclick='da';
input1.onclick='da';
p.appendChild(input);
body.appendChild(p);
p1.appendChild(input1);
body.appendChild(p1);
function da(){alert('ok')}
A voir également:
- Js onclick='function';
- Js arrondir - Forum Webmastering
- Syntaxerror: 'return' outside function - Forum Python
- (Function(){css.removeclass(document.body,%20'profile_two_columns'); tab_controller.changepage("photos");})() ✓ - Forum Facebook
- Please enable js and disable any ad blocker ✓ - Forum Services en ligne
- Arrondir js ✓ - Forum Windows
3 réponses
Bonjour
Ce ne serait pas
p = document.createElement('p'),
p1 = document.createElement('p'),
au lieu de
p = document.cretateElement('p'),
p1 = document.cretateElement('p'),
Ce ne serait pas
p = document.createElement('p'),
p1 = document.createElement('p'),
au lieu de
p = document.cretateElement('p'),
p1 = document.cretateElement('p'),
je ne comprends pas pourquoi ce code ne passe pas voici le bon code juste :
var body = document.getElementsByTagName('body')[0],
p = document.createElement('p'),
p1 = document.createElement('p'),
input = document.createElement('input'),
input1 = document.createElement('input');
input.onclick='da';
input1.onclick='da';
p.appendChild(input);
body.appendChild(p);
p1.appendChild(input1);
body.appendChild(p1);
function da(){alert('ok')}
var body = document.getElementsByTagName('body')[0],
p = document.createElement('p'),
p1 = document.createElement('p'),
input = document.createElement('input'),
input1 = document.createElement('input');
input.onclick='da';
input1.onclick='da';
p.appendChild(input);
body.appendChild(p);
p1.appendChild(input1);
body.appendChild(p1);
function da(){alert('ok')}