0
how to use html, css and js to be 1 code?
26 odpowiedzi
+ 19
Jacob I do the same when making Webview apps it's just easier to have the single index.html file.
+ 18
Place CSS between <style>CSS here </style> and JS between <script> JS here</script>
+ 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>
+ 3
For good practise and maintenance, separate your CSS and JavaScript into separated files.
With different files, it still can make apk.
+ 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");
+ 3
Isto é códigos JavaScript
+ 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.
+ 2
What's save button?
Where's your code?
+ 2
ok vou testar aqui
+ 2
ok tamo junto🤙
+ 1
I do not understand very well
+ 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
+ 1
so I want to make an apk app more I'm having difficulties because the codes are separated in html, css and javascript!
+ 1
Just link it
+ 1
as?
+ 1
Those are fundamentals, learn on internet or something.
+ 1
exactly :D But still don't get why he would do that.
+ 1
Calviղ ?
+ 1
yes I was able to generate the apk ja! but I have a question here can I make a save button?