Home>
I'm developing an app with Monaca, but I want to use a variable in the contents of the HTML tag to make the operation random, but I don't know what to do.
I want to use a variable inside the tag, such as<div position ="variable"> ;.
I thought about learning about "A-frame" for creating WebVR, but when specifying the color, position, and angle of an object
<a-box color = "# 6173F4" width = "4" height = "10" depth = "2" position = "-10 5 -5" rotation = "0 0 45" scale = "2 0.5 3">
Since it is specified in the tag like this, I do not know how to make it random in such a state.
-
Answer # 1
-
Answer # 2
Isn't it possible to perform data binding normally because monaca can use the mechanism of Angular?
I don't know the specifications of "A-frame" ...Image is
<a-box color = "{{data.color}}" width = "{{data.width}}" height = "{{data.height}} "...
It ’s like that.I use img tag instead of a-box tag, but it looks like this
https://codepen.io/anon/pen/NvyNrW
Related articles
- javascript - i want to rewrite the inside of an element using the append method in jquery
- javascript - addition using ++ is not reflected in js
- javascript - bug (?) when using axios configuration file as a plugin in nuxt
- javascript - how to use multiple select box refinements using the chosenjs library
- crash test using javascript canvas
- i want to encrypt with javascript using the public key created by openssl
- i want to update the db using variables in pdo in php, but it doesn't work
- javascript - i want to shorten the code using a for statement because it is long
- javascript - i want to change the process using check in jquery
- javascript - i want to dynamically rename a variable when using a for statement
- javascript - behavior of if statement using or condition
- javascript - get json data of external api using useeffect of react hooks
- javascript - i want to insert the start tag and end tag of html tags individually using jquery
- javascript - i want to make a copy using a script in a spreadsheet
- javascript - how to handle variable variables without using eval ()
- javascript - i want to use variables in common methods in individual methods
- about the behavior of member variables of javascript class
- javascript - i want to display pdf from url using react-pdf
- javascript - how to implement client-side rendering using nextjs
- ruby - passing variables using render partial
Related questions
- javascript - to play the video corresponding to the entered characters
- javascript - about switching the display between desplay: none;and desplay: block;
- javascript - i want to make a program in which the entered value is calculated automatically
- javascript - i want to display an element by selecting a radio button
- i want to specify the path of the php file in the public folder of laravel from javascript
- hamburger menu in javascript does not work
- javascript - uncaught error: unknown format: i don't know how to resolve [object htmlheadingelement]
- javascript - i want to use a custom element of
- javascript - how to get multiple jquiry radio button values
- [javascript] how to create a fizzbuzz problem in html
I think the
data attribute is useful.
Try using the data attribute in jQuery