0

how to use html, css and js to be 1 code?

6th Aug 2018, 6:49 PM
Neymar Silva
Neymar Silva - avatar
26 odpowiedzi
+ 19
Jacob I do the same when making Webview apps it's just easier to have the single index.html file.
6th Aug 2018, 7:57 PM
bobbie
bobbie - avatar
+ 18
Place CSS between <style>CSS here </style> and JS between <script> JS here</script>
6th Aug 2018, 7:48 PM
bobbie
bobbie - avatar
+ 6
<!DOCTYPE html> <html> <head> <title>Page title</title> <style> /*place all CSS here*/ </style> <script> /*place all JS here*/ </script> <body> Document content here </body> </html>
6th Aug 2018, 7:50 PM
Ipang
+ 3
For good practise and maintenance, separate your CSS and JavaScript into separated files. With different files, it still can make apk.
7th Aug 2018, 12:44 AM
Calviղ
Calviղ - avatar
+ 3
You need to save the data to local storage For save item when item is updated: localStorage.setItem("diamonds", diamondNum); For load item when app starts: diamondNum = localStorage.getItem("diamonds");
7th Aug 2018, 1:14 AM
Calviղ
Calviղ - avatar
+ 3
Isto é códigos JavaScript
7th Aug 2018, 1:19 AM
Calviղ
Calviղ - avatar
+ 2
Dont define file like src="", just add closing tag and write within the block. I think JS is type="text/script" and for css, <style></style>. both shod be in body. But it is way better to seperate files. Google info about type="", it should work without it but it is better to specify what code is goi g to be written.
6th Aug 2018, 7:00 PM
Jacob
Jacob - avatar
+ 2
bobbie Ipang tranks♥️
6th Aug 2018, 8:11 PM
Neymar Silva
Neymar Silva - avatar
+ 2
What's save button? Where's your code?
7th Aug 2018, 1:03 AM
Calviղ
Calviղ - avatar
+ 2
ok vou testar aqui
7th Aug 2018, 1:16 AM
Neymar Silva
Neymar Silva - avatar
+ 2
ok tamo junto🤙
7th Aug 2018, 1:20 AM
Neymar Silva
Neymar Silva - avatar
+ 1
I do not understand very well
6th Aug 2018, 7:13 PM
Neymar Silva
Neymar Silva - avatar
+ 1
If you know how to keep it separated keep it. If you want it to be one file, google something like : One file web
6th Aug 2018, 7:16 PM
Jacob
Jacob - avatar
+ 1
so I want to make an apk app more I'm having difficulties because the codes are separated in html, css and javascript!
6th Aug 2018, 7:18 PM
Neymar Silva
Neymar Silva - avatar
+ 1
Just link it
6th Aug 2018, 7:20 PM
Jacob
Jacob - avatar
+ 1
as?
6th Aug 2018, 7:21 PM
Neymar Silva
Neymar Silva - avatar
+ 1
Those are fundamentals, learn on internet or something.
6th Aug 2018, 7:22 PM
Jacob
Jacob - avatar
+ 1
exactly :D But still don't get why he would do that.
6th Aug 2018, 7:50 PM
Jacob
Jacob - avatar
+ 1
6th Aug 2018, 11:20 PM
Neymar Silva
Neymar Silva - avatar
+ 1
yes I was able to generate the apk ja! but I have a question here can I make a save button?
7th Aug 2018, 12:51 AM
Neymar Silva
Neymar Silva - avatar