홈>
각 필드의 내용을 복사하여 단일 텍스트 상자에 붙여 넣는 Javascript를 사용하여 HTML 양식을 만들려고합니다.
제공된 HTML 코드
<h1><a>Call Flow Cheat Sheet</a></h1>
<form id="callflow" class="appnitro" method="post" action="">
<div class="form_description">
<h2>Callflow</h2>
<p>Flowsheet to take notes and ensure you meet all QA elements on every call.</p>
</div>
<ul >
<li id="li_1" >
<label class="description" for="cust_name">Greet Customer </label> <br>
Thank you for calling ___________ My Name is David to Whom do I have the Pleasure of Speaking with today? <br><br>
<label class="description" for="cust_name"> Customer Name</label>
<div>
<input id="cust_name" name="cust_name" class="element text medium" type="text" maxlength="255" value=""/>
<br>
</div>
<label class="description" for="call_reason">Reason for the call. </label>
<div>
<textarea id="call_reason" name="call_reason" class="element textarea medium"></textarea>
</div>
</li>
<li id = "li_2" >
<label class="description" for="element_2">Provide Assurance Statement </label>
<p>____________ I want to personally apologize that your having to deal with this if this happened to me I would be fustrated as well.</p> <br>
</li>
<li id = "li_3" >
<label class="description" for="element_3">Provide Promoter Statement </label>
<p> This is not the experience we want our customers to have here at ______________. I would be more than happy to take care this for you. </p><br>
</li>
<li id="li_4" >
<label class="description" for="element_4">Ask Probing Questions:</label>
Why do you want to return [insert item]? <br>
Can I ask why your seeking to cancel your order? <br>
Was this item for an event? <br>
Could you describe the damage to me?
<br>
<br>
</li>
<li id = "li_5">
<label class="description" for="tailored_solution"> Propose Solution </label>
<p>D. Discount to keep. | R. Replacement Parts | U. Unit | M. Money Back</p>
<br>
<div>
<textarea id="tailored_solution" name="tailored_solution" class="element textarea medium"></textarea>
</div>
<br>
<br>
<label class="description" for="tailored_solution"> WRAP Call </label>
<p> It's going to take just a brief moment here for me to finish up processing this request for you. You wont hear anything but rest assured I am still here just holler if you need anything. </p>
</li>
<li id="li_6" >
<label class="description" for="set_expectations">Recap & Set Expectations. </label>
<span>
<input id="set_expectations_discount" name="set_expectations_discount" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="set_expectations_discount">Discount Expectations</label>
<input id="set_expectations_replacement" name="set_expectations_replacement" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="set_expectations_replacement">Replacement Expectations</label>
<input id="set_expectations_refund" name="set_expectations_refund" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="set_expectations_refund">Refund Expectations</label>
<input id="set_expectations_return" name="set_expectations_return" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="set_expectations_return">Return Expectations</label>
</span>
</li>
<li id="li_7" >
<label class="description" for="close">Check for Additional Needs Addressing any Remaining Questions. </label>
<span>
<input id="close_1" name="close_1" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="close_1">Yes</label>
<input id="close_2" name="close_2" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="close_2">No</label>
</span>
</li>
<li id = "li_8">
<label class="description" for="notes"> Generate Notes </label>
<input type="checkbox" name="notes_gen" onclick="FillNotes(this.form)">
<em>Check this box to generate notes.</em>
<div>
<textarea id="notes" name="notes" class="element textarea medium"></textarea>
</div>
<li class="buttons">
<input type="hidden" name="form_id" value="6865" />
<input id="clearForm" class="button_text" type="reset" name="Clear" value="Clear" />
</li>
</ul>
</form>
<div id="footer">
<a>Created by David Desilets Associate SSC 1</a>
</div>
</div>
<img id="bottom" src="bottom.png" alt="">
</body>
</html>
자바 스크립트 코드 제공
function FillNotes(f) {
if(f.notes.checked == true) {
f.notes.value = f.cust_name.value;
f.notes.value = f.call_reason.value;
f.notes.value = f.tailored_solution.value;
f.notes.value = f.set_expectations.value;
f.notes.value = f.set_expectations_discount.value;
f.notes.value = f.set_expectations_refund.value;
f.notes.value = f.set_expectations_replacement.value;
f.notes.value = f.set_expectations_return.value;
f.notes.value = f.close.value;
f.notes.value = f.close_1.value;
f.notes.value = f.close_2.value;
}
}
이제 붙여 넣기를 원하는 마지막 텍스트 상자를 제외하고 각 확인란 및 텍스트 영역의 내용을 복사하고 | 또는/
먼저 내가 뭘 잘못하고 있니? 내 JS는 최고입니다. 누군가 나를 기꺼이 도와 줄 것입니까?
PS 제출 버튼이 직장에서 "메모 작성"을 대체하기 위해 재설정으로 대체되었으므로 에이전트 컴퓨터에서 스티커 메모에 대한 액세스를 제거 할 수 있습니다.
-
답변 # 1
관련 질문
- javascript - 캔버스 모양의 원을 만드는 방법?
- html - 자바 스크립트를 사용하여 이미지를 텍스트로 변환하는 방법
- html - JavaScript를 사용하여 활성 클래스 교체가 제대로 작동하지 않음
- javascript - Div는 JQuery 숨기기 기능으로 숨기지 않습니다
- javascript - 클릭 한 버튼에 클래스를 추가하고 이전에 클릭 한 버튼에 클래스를 제거하는 방법
- html - 클라이언트 측 자바 스크립트 파일 세트 양식 태그 속성
- html - 공백을 제거하고 자바 스크립트로 단어 사이에 대시 추가
- html로 자바 스크립트 인쇄 기능
- html - 자바 스크립트에서 키보드 키로 입력 필드를 전환하는 방법은 무엇입니까?
- javascript - 데이터 바인딩으로 검색하는 td 값에서 특정 데이터 나열
=
를 사용하여 요소의 값에 할당 할 때 다른 할당 작업과 마찬가지로 이전 값은 더 이상 속성에 연결되지 않습니다. 사라질 것입니다. 대신연결하여 문자열을 서로 연속적으로 바꾸지 않고 함께 연결해야합니다.또는 하나의 문자열로 시작하여그런 다음해당 문자열을
f.notes.value
에 할당하면 훨씬 좋습니다. :