Can anyone please tell me why this code is not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone please tell me why this code is not working

This Is a html code for form in which when we click button we jump to a website but in my code i cannot do that can any one give me solved code https://code.sololearn.com/Wl6HU4pVZtOW/?ref=app https://code.sololearn.com/Wl6HU4pVZtOW/?ref=app https://code.sololearn.com/WoRO9S6ttVN9/?ref=app https://code.sololearn.com/Wl6HU4pVZtOW/?ref=app https://code.sololearn.com/Wl6HU4pVZtOW/?ref=app

28th Jul 2023, 9:13 AM
KARTIK Patel
KARTIK Patel - avatar
8 Answers
+ 4
You have onEclick in the attributes of your button.
28th Jul 2023, 9:21 AM
Ausgrindtube
Ausgrindtube - avatar
+ 4
KARTIK Patel , According to your code, few errors are present.. For fix the error.. `src` is wrong attribute. Src is used the specify source URL i.e(location)for external resources.. Such as images,video,script.. For button behavior you can use(JavaScript)`window.location.href` for define location instead of `button.src`. second.. correct the spelling `onclick`.
28th Jul 2023, 10:51 AM
Darpan kesharwani๐Ÿ‡ฎ๐Ÿ‡ณ[Inactive๐Ÿ“š]
Darpan kesharwani๐Ÿ‡ฎ๐Ÿ‡ณ[Inactive๐Ÿ“š] - avatar
+ 1
Sorry I uploaded an image slider code by mistake just ignore it
28th Jul 2023, 9:14 AM
KARTIK Patel
KARTIK Patel - avatar
+ 1
Can you give me it's solved version
28th Jul 2023, 9:26 AM
KARTIK Patel
KARTIK Patel - avatar
+ 1
For CSS: * { /*Changes all the tags styles*/ padding:0; margin:0; box-sizing:border-box ; margin:5px 0; } h1 { /*heading 1 change color*/ color:pink; } body { /*changes made in body tag will effect the whole page*/ text-align:center ; margin-top:50%; padding:10px; background:green; } select { /*stylimg the select tag*/ width:100%; background:red; color:pink; border:none; outline:2px solid blue; } .btn { /*Custom style for a button look*/ margin-top:10px; padding:10px; background:darkgreen; } .btn:hover { background:red; color:cyan; } a { /*changing the a tag which can link pages*/ text-decoration:none; color:pink; display:block ; }
30th Jul 2023, 6:54 AM
Technical Hassaan
Technical Hassaan - avatar
0
Hey you can try this ๐Ÿ˜Š I have made a solution for you ๐Ÿ˜Š And if you need help then you can DM me or ask me any questions if you have problems with your code ๐Ÿ˜Š You can copy my code here ๐Ÿ˜Š
30th Jul 2023, 6:54 AM
Technical Hassaan
Technical Hassaan - avatar
0
For HTML: <!DOCTYPE html> <html> <!--The hewd tag is not for displaying contents in HTML, It is used for Hidden information about the web page--> <head> <!--Add your web page name to the title tag--> <title>Dare To Solve</title> </head> <body> <!--All the tags which contains content should be in the body tag--> <h1>Who Are You</h1> <select> <option>Male</option> <option>Female</option> <option>Animal</option> <option>alien</option> <option>Dont Wanna Tell (Because you dont know who are you)</option> </select> <a class="btn" href="https://bard.google.com/?hl=en_GB">submit</a> <!--<button oneclick = "button.src"="https://bard.google.com/?hl=en_GB">sumbit</button> --> </body> </html>
30th Jul 2023, 6:54 AM
Technical Hassaan
Technical Hassaan - avatar
0
See I have commented everything for you ๐Ÿ˜Š Now you can explore new things and yeah if you don't understand them then I will let you explain ๐Ÿ˜Š
30th Jul 2023, 6:55 AM
Technical Hassaan
Technical Hassaan - avatar