Whenever I refresh the page, for word alteration, "May I know your name?" I want to drag this "know me your name" to change it after your "#" like "I Know Your Name" after clicking on the SHUFFLE button.
HTML: style & gt; .box {width: 200px; height: 20px; padding: 10px; border: 1px solid #aaaaa; display: inline-block;} .mover {color: red; background color: yellow; width: auto; font-size: 30px; border: 2px;} # ID1 {color: black; background color: # 2BFFB6; width: 150px; fon T-Size: 40px; Border: 1px; Display: Inline; Margin: 20px;} # ID2 {Color: Black; Background Color: # 2BFFB6; width: 150px; font-size: 40px; border: 1px; Display: Inline; Margin: 20px;} # ID3 {Color: Black; Background Color: # 2BFFB6; width: 150px; font-size: 40px; border: 1px; display: inline; margin: 20px;} # ID4 {Color: Black; Background Color: # 2BFFB6; width: 150px; font-size: 40px; border: 1px; display: inline; Margins: 20px; } # Id5 {color: black; Background color: # 2BFFB6; Width: 150px; Font-size: 40px; Border: 1px; Display: Inline; Margins: 20px; } # Id 6 {color: black; Background color: # 2BFFB6; Width: 150px; Font-size: 40px; Border: 1px; Display: Inline; Margins: 20px; }
& lt; Div id & gt; Is it dragable and droppable? & Lt; / Div & gt; & Lt; / Body & gt; & Lt; Top & gt; & Lt ;? Php $ conn = mysql_connect ("localhost", "root", "password"); If (! Mysql_select_db ("login")) {echo "unable to choose database go" mysql_error (); Go out; } $ Sql = "SELECT table to WHERE id = 1"; $ Result = mysql_query ($ sql); While ($ line = mysql_fetch_assoc ($ result)) {$ output = $ line ["full"]; } Mysql_free_result ($ result); ? & Gt; & Lt; Script & gt; Var js_var = "& lt ;? php $ output echo? & Gt;"; Var div_id = ['id1', 'id2', 'id3', 'id4', 'id5', 'id6', 'id7', 'id8', 'id9', 'id10']; Var box_id = ['box 1', 'box 2', 'box 3', 'box 4', 'box 5', 'box 6', 'box 7', 'box 8', 'box 9', ' Box 10 ']; Var Basic = js_var.split ("#"); Var balls = 90 = js_var.split ("#"); Function getNumbers () {var player1 = new array (); Balls90.sort (function () {return Math.random () - .25;}); (Var i = 0; i & lt; balls90.length; i ++) {document.writeln ('& lt; div id = "+ box_id [i] +" class = "box" droppable = "true" Ondrop = "drop (event)" ondragover = "allow (event)" & gt; & lt; / div & gt; '); } (Var i = 0; i & lt; balls90.length; i ++) {player1.push (ball 090 [i]); }} GetNumbers (); Function draggable {dragEvent.dataTransfer.setData ("text / html", dragEvent.target.textContent + "|" + dragEvent.target.parentNode.id); } Function drop word (drop event) {var dropData = dropEvent.dataTransfer.getData ("text / html"); Var dropItems = dropData.split ("|"); Var prevElem = document.getElementById (dropprint [1]); PrevElem.getElementsByTagName ("div") [0] .textcontent = dropEvent.target.textContent; DropEvent.target.textContent = dropItems [0]; DropEvent.preventDefault (); } Function allowDrop (ev) {ev.preventDefault (); } Function drag (ev) {ev.dataTransfer.setData ("text", ev.target.id); } Function drop (ev) {ev.preventDefault (); Var data = ev.dataTransfer.getData ("text"); Ev.target.appendChild (document.getElementById); // var data_content = document.getElementById (data) .innerText; // Alert ('The selected text is:' + data_content + '.'); } & Lt; / Script & gt; & Lt; Button ID = "Shuffle" type = "button" & gt; Schaufel & lt; / Button & gt; & Lt; / Head & gt;
Hope this will help you:
Var TextDiv = document.getElementById ('text'); Document.getElementById ('Shuffle'). AddEventListener ('click', function () {var word = textDiv.innerText.split (''); var len = words.length; var result = ''; textDiv.innerText = ''; for (var i = 0 ; I & lt; len; ++ i) {var randIndex = Math.floor ((Math.random (* * words.length)); Results + = word [randindex] + ''; word; .sice ( Randindex, 1);} text div. Winner text = result;}, wrong); JSField:
Popular posts from this blog
I have a SKScene where I am adding an SKSpriteNode I have subclassed the SKSpriteNode class to create this node. In the subclass I am defining some SKActions on Sprite. What do I want to do when the end of this phantom ends the SKAction sequence, then I add a new Prayer node to this scene. How is this possible. The following code is mine: The code for the sequence is that I'm running on the Scansprinitode subclass (TEMissileNode): - SKAction * moveDown = [SKAction moveToY: Self.position.y - 20 Duration: 0.2]; SKAction * animation = [SKAction animateWithTextures: textures timePerFrame: time / 7]; SKAction * moveMissileProjectile = [SKAction Moving: Pointoffscreen Term: Time]; SKAction * group = [SKAction group: @ [animation, movement projectile]]; SKAction * Sequence = [SKAction Sequence: @ [Hilldown, Group, [SKAction removalFromParent]]]; [Self run action: sequence]; From the main scene, I call those actions that execute these tasks TEMissileNode * missile = [tmissil...
An embarrassing simple question seems to be, but how can I move a Matlab table vector? aTableT = aTable '; I tried a standard syntax for the simple interaction of a line vector to a line vector aTable : ATableT = reshape (aTable, 1, Height (aTable)); and aTableT = rot90 (aTable); According to the head, the last time table should work for table, see. However, I get this error code: Error type in using table / permit (line 396) Undefined function 'permute' for the input arguments. Error in rot 90 (line 29) b = magnitude (b, [2 1 3: ndims (a)]); NB: fliplr is not useful either pretty sure I have covered clear angles - any ideas? Thanks! Try changing your table into an array, move it, then back to a table In other words, try doing this: aTableArray = table2array (aTable); ATableT = array 2table (aTableArray. '); I have also read the document for rot90 , and it says that rot90 is definitely working for tables Do, and I find you...
I have a small form with 10 text boxes, I have set them in the correct tab order. I want them on my tab service I was wondering if there is a way to set the text box so that they can be selected for editing until they are tabbed. That is ... I do not want the end user to edit the text box to click on them, I just want to make them editable through tabu. this should do the trick public partial category poor text box: Text Box {Safe Override Zero WndProc (Ref: Message Message) {if (m.msg == (Int) WM.LBUTTONDOWN) {Return; // mount down events} base.WndProc (ref m); }} Window message enum can be found. How to do this without anherizing: text box : class EatMouseDown: netwindows {safe override zero WndProc (ref message message) {if (m.msg == (int) WM.LBUTTONDOWN) {return; } Base.WandProc (Ref M); }} Safe Override Zero Onload (EventEurge E) {base.OnLoad (e); How to do this without any part: left a clean part, whatever is important, this can be a buggy but it works R...
Comments
Post a Comment